disabled control text color

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
 
A

Alex Clark

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
 
W

Wiktor Zychla

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top