Highlight selected button!

3 posts, 0 answers
  1. amrutha anil
    amrutha anil avatar
    8 posts
    Member since:
    Jan 2010

    Posted 27 Jul 2010 Link to this post

    I got '4' radButtons for my application. When each button is clicked it will open up a form. I wanted to modify the buttons in such a way that the button which is clicked  keeps highlighted until another button is clicked...!

  2. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 28 Jul 2010 Link to this post

    Hello Amrutha,

    You can achieve this by setting the property IsMouseDown to the button on the MouseUp event.
    This property is found in radButton1.ButtonElement.IsMouseDown.

    But be careful because you will have to set also the opposite to the button (radButton1.ButtonElement.IsMouseDown = false)  for it to revert to the default state.

    Hope this helps,
    Emanuel Varga
  3. DevCraft R3 2016 release webinar banner
  4. Boryana
    Boryana avatar
    330 posts

    Posted 30 Jul 2010 Link to this post

    Hello everyone,

    Thanks for writing.

    As far as I understand you would like to combine the behavior of RadRadioButton with the appearance of RadToggleButton. If this is the case, there are two general approaches:

    1. The first one is to use four RadRadioButtons and to customize their appearance so that they look like RadToggleButtons. For your convenience I have already customized the ControlDefault theme in such a way which can be found in the attached project. In case you need other themes for your application, you can easily modify the default themes by using our Visual Style Builder tool. Here are some help articles:

    2. The second approach is to use four RadToggleButtons and customize their behavior so that they behave as a group of RadRadioButtons. In this case you will have to handle the ToggleStateChanged event and implement your own logic to change the ToggleState of the buttons. Please have in mind that changing the ToggleState within the ToggleStateChanged event might introduce some additional difficulties.

    I hope you find my answer useful. Let me know if you have further questions.

    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
Back to Top