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

RadTextboxControl

1 Answer 35 Views
Documentation
This is a migrated thread and some comments may be shown as answers.
Craig
Top achievements
Rank 1
Craig asked on 28 Jun 2018, 09:58 AM

When I disable a RadTextboxControl the "BackColor" color turns "gray" which appears to be the default color. I've been unable to find anything on how to change the default "BackColor" on the disabled control. Anytime I update the "BackColor" property via the code behind or designer itself it always goes back to the same "gray" BackColor. Thoughts?

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 28 Jun 2018, 10:31 AM
Hi Craig,

Set the UseDefaultDisabledPaint of the root element to false. This way you will use the color from the theme instead of the default gray color:
radTextBoxControl1.RootElement.UseDefaultDisabledPaint = false;

After that you can set the disabled color in the code with the following method:
radTextBoxControl1.TextBoxElement.SetThemeValueOverride(RadTextBoxControlElement.BackColorProperty, Color.Red, "Disabled");

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Documentation
Asked by
Craig
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or