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
thank you
9 Answers, 1 is accepted
0
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
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
0
Web
Top achievements
Rank 1
answered on 08 Dec 2006, 03:15 PM
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
thank you
0
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
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
0
Phillip
Top achievements
Rank 1
answered on 13 Dec 2011, 05:15 PM
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
0
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:
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
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.
0
Moti
Top achievements
Rank 1
answered on 06 Sep 2015, 02:00 PM
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.
0
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
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
0
Moti
Top achievements
Rank 1
answered on 09 Sep 2015, 11:32 AM
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.
0
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:
Please let me know if there is something else I can help you with.
Regards,
Dimitar
Telerik
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.
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