RadButton Selected State?

10 posts, 0 answers
  1. Web
    Web avatar
    88 posts
    Member since:
    Nov 2006

    Posted 07 Dec 2006 Link to this post

    I would like to be able to Set not only isPressed or Mouse Over. I would like to change the visual style of  the button as soon as it is selected. how can i accomplish this with the visual theme builder. i tried everything but it just does not keep the style i applied to isPresses or mousedown.
    thank you
  2. Mike
    Admin
    Mike avatar
    640 posts

    Posted 08 Dec 2006 Link to this post

    Hello Kerstin,

    The theming feature of RadButton enables you to specify different look depending on each possible state of the control. The problem in your case is that RadButton does not have any "Selected" state. Can you please specify in details how the "selected" state you mention should behave (may be some additional property should be added) and we will try to help you modify the theme for your control accordingly to achieve the desired results.

    Kind regards,
    Mike
    the telerik team
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Web
    Web avatar
    88 posts
    Member since:
    Nov 2006

    Posted 08 Dec 2006 Link to this post

    Thank you for the immediate reply. well what i would like to be able to is as soon as the button is pressed and ist event is triggered that it stays in this state until another action (user chooses another button) happends. in the moment it would go right away back to its initial state. i have solved it with using the togglebutton and used the actions enter and leave in my code behind but it would be great if you could implement this functionality in the radButton element too. why? because it is a possibility to show the user which button they just pressed. so you would have a state for initializing, for the mouse over/out/pressed and selected
    thank you
  5. Mike
    Admin
    Mike avatar
    640 posts

    Posted 08 Dec 2006 Link to this post

    Hi Kerstin,

    Nice suggestion, thank you for that. We would definitely pay attention to that problem for the next release. 

    Currently we have implemented visual-cues display for some of our controls like RadButton, RadTabStrip, ListBox and others. I think that the visual frame, drawn around the focused "item" is something close to the one you need. You can take a look at the following example - RadControl -> Common Func. -> Accessibility -> Tab Stops And UI Cues, about using this feature. Basically you just have to set the property AllowShowFocusCues of the corresponding control.

    Another property that might come handy in your case should be IsFocused defined in RadElement (under the key IsFocusedProperty). You surely can use this one to create a theme with visual style dependant on this property. The problem in this case is that this property would have a significant value only for the RadButtonElement itself and not for the Fill and other elements in it that you might want to style. We may also think about a solution of that problem too if needed. In all cases, drop us a line and let us know if we ca help in any other way with that. 

    Best wishes,
    Mike
    the telerik team
  6. Phillip
    Phillip avatar
    27 posts
    Member since:
    Mar 2011

    Posted 13 Dec 2011 Link to this post

    Has this been implemented?  I would like to have user click a radbutton and ajax post back to the same page with some changes and show that the button is selected.  I would just need a way to code from behind that the radbutton is selected.  IE radbutton1.selected = True
  7. Jack
    Admin
    Jack avatar
    2333 posts

    Posted 16 Dec 2011 Link to this post

    Hi Phillip,

    Thank you for contacting us.

    Could you please specify whether your inquiry is about a WinForms application or a Web application. If the first one is true, you can turn on the focus cues in RadButton by using the following code:
    RadButton button = new RadButton();
    button.Text = "aaa";
    button.Location = new Point(50, 50);
    button.Size = new Size(200, 20);
    button.AllowShowFocusCues = true;
    this.Controls.Add(button);

    However, if you are asking regarding our web controls, please post your question in the ASP.Net forum.

    Thank you for your understanding.
     
    Kind regards,
    Jack
    the Telerik team

    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

  8. Moti
    Moti avatar
    5 posts
    Member since:
    Jan 2014

    Posted 06 Sep 2015 in reply to Jack Link to this post

    Hello!

    I working in winforms  .

    I set the property

    button.AllowShowFocusCues = true;​

    this not solve my problem

    I still see my button style as unmark after I release the button .

    10x.

     

  9. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 08 Sep 2015 Link to this post

    Hello Moti,

    Thank you for writing.

    If you want to indicate a state you can use RadToggleButton or RadToggleSwitch. The AllowShowFocusCues property allows you to indicate which button is currently focused (see attached image).

    Let me know if you have additional questions.

    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  10. Moti
    Moti avatar
    5 posts
    Member since:
    Jan 2014

    Posted 09 Sep 2015 in reply to Dimitar Link to this post

    Hello Dimitar

    My problem is ,I have regular radButton .

    When I move over/click the button the button automatically recive diffrent style.

    I want to keep the style after I finish to click on the button.

    Thanks.

     

     

  11. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 10 Sep 2015 Link to this post

    Hello Moti,

    Thank you for writing back.

    This is exactly what the toggle button does (see attached video). The default styles of the regular button can be changed as well. For example the following snippet shows how you can change the default BackColor and BorderColor: 
    radButton1.ButtonElement.ButtonFillElement.BackColor = Color.Orange;
    radButton1.ButtonElement.ButtonFillElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
    radButton1.ButtonElement.BorderElement.ForeColor = Color.Red;

    Please let me know if there is something else I can help you with. 
     
    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for WinForms is Visual Studio 2017 Ready