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

How to override the default style for disabled control?

3 Answers 187 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Edward
Top achievements
Rank 1
Edward asked on 28 May 2008, 06:22 PM
The default style for disabled control is grey.  Instead of displaying it grey I want to have it use the same color, except that user cannot interact with the control

I look into the Style Builder, but couldn't find anything regarding this.

3 Answers, 1 is accepted

Sort by
0
Mike
Telerik team
answered on 30 May 2008, 08:23 AM
Hi Edward,

I hope you be happy that answer of your question is fairly simple.

The default disabled "paint" of each RadControl can be controlled through its RootElement.UseDefaultDisabledPaint property. It defaults to true, so in your case you should just set it to false and all should work just fine.

Only RadTextBox has a slightly different behavior - the text would become gray. This is because of the hosted standard TextBox control that we use. I hope it would not be a great issue for you. I'm attaching a sample project that demonstrates this.

If you have any additional questions, please contact us.

All the best,
Mike
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Edward
Top achievements
Rank 1
answered on 30 May 2008, 07:34 PM
The text in RadComboBox is also grey out, just like the RadTextBox.  So I guess this behavior is inherited from the standard ComboBox control?
0
Angel
Telerik team
answered on 02 Jun 2008, 11:31 AM
Hello Edward,

The text area of the RadComboBox is actually a text box. Unfortunately, this hosted text box does not give us a way to set the ForeColor of the disabled text - it is always gray. The structure of the RadComboBox is given in the Element Structure help article (RadTextBoxItem hosts a text box).

To explore further the content of RadComboBox, you can use RadControlSpy:
Documentation
KB Articles

I hope this helps. Contact me again if you need further information.

All the best,
Angel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Themes and Visual Style Builder
Asked by
Edward
Top achievements
Rank 1
Answers by
Mike
Telerik team
Edward
Top achievements
Rank 1
Angel
Telerik team
Share this question
or