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

Enable Styling

3 Answers 68 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Siam
Top achievements
Rank 1
Siam asked on 28 May 2008, 09:49 AM
How to change the style of disable control ?

3 Answers, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 30 May 2008, 12:16 PM
Hi Siam,

Thank you for the question.

To change the disabled style, you have to implement your custom theme with added states for the necessary elements with the condition handling the case when RadElement.Enabled property is set to false. Then, all you have to do is to apply the theme and set the UseDefaultDisabledPaint property of the respective element to false. The style you defined for elements will be applied when the control has been disabled.

I hope this helps. If you need additional assistance, do not hesitate to contact me again.

Best wishes,
Martin Vasilev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Reid McClanahan
Top achievements
Rank 1
answered on 24 Jun 2008, 10:10 PM
what if I dont want to build a whole theme, but just get one element to hold a new background color after being clicked?  I have not created a theme, but have a default ribbon bar loaded.  I want to have a 'quick access toolbar item' to show a different color when it has been clicked to show that item being 'active' on my form.
0
Nikolay
Telerik team
answered on 26 Jun 2008, 04:04 PM
Hello Reid,

There are two approaches that I can suggest for your scenario:
  1. Change the BackColors of normal RadButtons. However, this approach requires keeping track of the button state by holding a boolean variable.
  2. Using RadToggleButtons. They automatically toggle on/off when you click on them and you do not need to keep the boolean variable.

You can also combine these two approaches - use RadToggleButtons for automatic on/off states and setting their BackColors according to your preference. I have attached a sample project to demonstrate the usage of RadButtons and RadToggleButtons.

If you have additional questions, feel free to contact me.

Sincerely yours,

Nikolay
the Telerik team


Instantly find answers to your questions at the new Telerik Support Center
Tags
Themes and Visual Style Builder
Asked by
Siam
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Reid McClanahan
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or