This is a migrated thread and some comments may be shown as answers.

Highlight selected button!

2 Answers 326 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
amrutha anil
Top achievements
Rank 1
amrutha anil asked on 27 Jul 2010, 01:16 PM
Hi,
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...!

Thanks

2 Answers, 1 is accepted

Sort by
0
Emanuel Varga
Top achievements
Rank 1
answered on 28 Jul 2010, 03:32 PM
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
0
Boryana
Telerik team
answered on 30 Jul 2010, 05:23 PM
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.

Greetings,
Boryana
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
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
amrutha anil
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Boryana
Telerik team
Share this question
or