Selected text colour for DateTimePicker

1 Answer 71 Views
DateTimePicker
ASM
Top achievements
Rank 1
Iron
Iron
ASM asked on 07 Aug 2023, 12:52 PM

Hi,

How can I change the selected text colour of a RadDateTimePicker?

I'm not sure if this is possible, I'm afraid the DateTimePicker uses a MaskedEditBox, which uses a RadTextBox, which in turn uses a normal TextBox from .Net... so in the end I don't think it can be done, am I right? If so, is there a viable alternative?

Also, why are most edit controls based on RadTextBox instead of RadTextBoxControl? Wouldn't it be better to use the latter and take advantage of the fact that it has more Telerik features built in?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 08 Aug 2023, 11:27 AM

Hi Armand SM,

You are in the right direction. The editable area of RadTextBox, RadDateTimePicker, and RadDropDownList hosts the standard MS TextBox. It doesn't support changing the selection color. The color comes from the Windows itself. So far I couldn't find a proper way to change the selection color of MS TextBox. In this StackOverflow thread is suggested a possible solution, however, the code changes the Windows setting and I don't think that this will be desirable by the end user.

You are right that RadTextBoxControl is better in some scenarios, however, one of the reasons why we need the RadTextBox is the Right-to-Left functionality which is not supported by the RadTextBoxControl. I would suggest checking the RadTextBoxControl vs RadTextBox help article which compares both controls. 

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
DateTimePicker
Asked by
ASM
Top achievements
Rank 1
Iron
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or