Changing control enabled color

  • Thread starter Thread starter AllenF
  • Start date Start date
A

AllenF

When one sets the "Enabled" property of a control such as a text box or
combo box to "false", the field will change color to a dark gray. I would
like to change this color to something else, such as a light blue to make
the contents easier to read.

Is this Possible????

Thanx, Allen
 
Allen,

Unfortunately, this is handled by the system, and can only be changed on
a system level. Because of this, you would have to change the system
defaults, which would probably affect more than you want.

However, you could handle the Paint event on the TextBox itself (or if
you subclass it, the OnPaint method). You could do all the painting
yourself, and you would get the color you want for the background.
Unfortunately, you still have to do all the painting yourself.

Hope this helps.
 
Back
Top