enabled property to false grays out text... which I don't want...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I don't want my text grayed out in a control that I disable. I can get around part of this by setting the background color to something other than Window (so that the control itself is not grayed out), but setting the forecolor in the same way does not work. Is there something I am missing here? Perhaps another property. I mean, no user should have to look at grayed out text, and the controls should be disabled until the user clicks Add or Edit.

There surely must be a way to get around this

Please advise

Thanks

Rick
 
* "=?Utf-8?B?Umljaw==?= said:
I don't want my text grayed out in a control that I disable. I can
get around part of this by setting the background color to something
other than Window (so that the control itself is not grayed out), but
setting the forecolor in the same way does not work. Is there something
I am missing here? Perhaps another property. I mean, no user should
have to look at grayed out text, and the controls should be disabled
until the user clicks Add or Edit.

Instead of disabling the textbox, set its 'ReadOnly' property to 'True'
and reset the colors.
 
Thanks a lot for your reply, Herfried !! I had tried the ReadOnly property before, but what happened was that it was doing the same thing with the graying out, and I had not tried changing the backcolor from the Window setting. Later I changed the color in conjunction with the Enabled setting, but while trying to find out about the grayed out text... I forgot about the ReadOnly property.

Anyway, thanks a lot... that will work. I would prefer that the user could not click in the control at all (hence it being locked as you can do in Access), but getting rid of the gray text and not allowing any editing without clicking Add or Edit... is the main priority, so that works for me
I don't want my text grayed out in a control that I disable. I ca
get around part of this by setting the background color to somethin
other than Window (so that the control itself is not grayed out), bu
setting the forecolor in the same way does not work. Is there somethin
I am missing here? Perhaps another property. I mean, no user shoul
have to look at grayed out text, and the controls should be disable
until the user clicks Add or Edit.

Instead of disabling the textbox, set its 'ReadOnly' property to 'True
and reset the colors
 
Back
Top