I have a windows form for editing a table. In Inquiry mode, I disable the
textboxes so unwanted updates dont occur. This causes the backcolor and
forecolor to go gray, making the text hard to read. I can change the
backcolor to white, but the forecolor stays gray. .forecolor properties seem
to be overridden by
textbox .enabled = false. Also, combo boxes still have a gray backcolor,
even if I set it's backcolor to white.
So how can I:
Change the forecolor property of a disabled textbox
Change the backcolor property of a disabled combo box
Thanks
Thanks
Cristian - 12 Dec 2004 16:55 GMT
I am also trying to find an answer to this not only for textboxes but for all
other controls as well. Can anyone help?
> I have a windows form for editing a table. In Inquiry mode, I disable the
> textboxes so unwanted updates dont occur. This causes the backcolor and
[quoted text clipped - 9 lines]
> Thanks
> Thanks
Zabi - 27 Apr 2005 07:04 GMT
Hi,
We can override "OnPaint" method of TextBox to change the BackColor
and ForeColor of a disabled TextBox. Check out the following link..
http://msdn.microsoft.com/smartclient/community/wffaq/ctrlsp.aspx#dab0mb0m
This will helps for TextBox, But i'm unable to do this for ComboBox.
Regards,
Zabi.