Color of the text in a Textbox with enabled = false

  • Thread starter Thread starter Broeden
  • Start date Start date
B

Broeden

Hi all

Is it possible to change the light gray color for the text in a
Textbox, when it is disabled? The text is hard to read when the
brightness is turned low for battery saving.

/Broeden
 
Have you considered setting the Readonly property instead of Enabled. The en
user will be able to click in the text box but will not be able to change
anything and the text remains the default colour.
 
Yes I have, but it's not only Textboxes that is the problem. The same
goes for ComboBoxes and NumericUpDown controls.

Enabled = false give me the desired functionality, that is you can't
do anything with the controls.

With ReadOnly you can put an insert cursor in the Textbox, you can
dropdown the combobox and scroll the NumericUpDown control.
I want everything "frozen" as with enabled = false.

My idea now is to combine enable = false and ReadOnly. I have to but
Textboxes on top of all comboboxes and NumericUpDown controls and copy
the text to and from the textboxes when changes are made. Now I can
put the Textboxes in ReadOnly and the ComboBoxes and NumericUpDown
disabled.

Some work but the result is acceptable.

If I inherit from the controls, I can forget all design time
adjustments I think, which I prefer.


/Broeden
 
Back
Top