disabled control text color

  • Thread starter Thread starter Wiktor Zychla
  • Start date Start date
W

Wiktor Zychla

how does the system compute the color that is used in disabled controls (for
example, TextBox)? how do I change that color (disabled controls are not
quite readable)?

(I do not want the control to be ReadOnly, I must have it disabled).

Regards,
Wiktor
 
Hi Wiktor,
I don't think there's any easy way to change the TextBox's "disabled
forecolor" property. My best suggestion to you would be to Inherit from the
TextBox and make it owner-drawn so that you do all the painting of the text
yourself (in your desired colour).

Cheers,
Alex Clark
 
I don't think there's any easy way to change the TextBox's "disabled
forecolor" property. My best suggestion to you would be to Inherit from the
TextBox and make it owner-drawn so that you do all the painting of the text
yourself (in your desired colour).

thanks, Alex. I think that custom drawn TextBox wouln't be so easy as it
sounds. Take a look at my message sent yesterday - I wrote about strange
issues when one tries to override OnPaint and OnPaintBackground for a
TextBox.

I think I need much deeper look at this problem.

Regards, Wiktor
 
Back
Top