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

How to change font color for disabled RadTextBox, RadDatePicker?

6 Answers 676 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 14 Nov 2012, 02:54 PM
Because of different user groups, we need to give different user access, so for some of them, we only want them to view the values of RadTextBox and RadDatePicker. So we disabled them. But the problem is the grey font color is too light to read. How can we change the font color of disabled RadTextBox and RadDatePicker?

6 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 15 Nov 2012, 06:30 AM
Hi Frank,

You can set DisabledStyle-ForeColor property of RadTextBox and DateInput-DisabledStyle-ForeColor property of RadDatePicker as follows to change the forecolor in disabled state.

ASPX:
<telerik:RadTextBox ID="RadTextBox1" runat="server" Text="jdfdsklfsdklfj" Enabled="false" DisabledStyle-ForeColor="Black" ></telerik:RadTextBox>
<telerik:RadDatePicker ID="RadDatePicker1" runat="server" DateInput-DisabledStyle-ForeColor="Black" SelectedDate="10-10-2012" Enabled="false" ></telerik:RadDatePicker>

Thanks,
Princy.
0
Gowtama Krishna
Top achievements
Rank 1
answered on 16 Nov 2016, 04:53 PM
Is there a way to have different colors to different words in the same with multiline enabled. So next line gets to start with different colors and other variants.
0
Gowtama Krishna
Top achievements
Rank 1
answered on 16 Nov 2016, 05:21 PM
In case we are using VB.NET
0
Rumen
Telerik team
answered on 17 Nov 2016, 10:41 AM
Hi Gowtama,

The requested feature is not supported out-of-the box by RadTextBox, which is rendered as <input> element on the page. The input elements can load only pure plain text content.

You can achieve your scenario with RadEditor by integrating and modifying a bit the custom client-side solution here. The content area of RadEditor is an editable div/iframe so you can use the approach demonstrated in the demo to change the colors of the letters/words in it.


Best regards,
Rumen
Telerik by Progress
Telerik UI for ASP.NET AJAX is ready for Visual Studio 2017 RC! Learn more.
0
Gowtama Krishna
Top achievements
Rank 1
answered on 17 Nov 2016, 05:48 PM
okay. this makes sense hope it works.
0
Rumen
Telerik team
answered on 18 Nov 2016, 01:13 PM
You can also see how to render RadEditor as a textbox in the following demo: Textbox-like RadEditor.


Best regards,
Rumen
Telerik by Progress
Telerik UI for ASP.NET AJAX is ready for Visual Studio 2017 RC! Learn more.
Tags
General Discussions
Asked by
Frank
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Gowtama Krishna
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or