Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

backcolor textbox when disabled

Status
Not open for further replies.

stx

Programmer
Sep 24, 2002
62
BE
Hi

Is there any way to change the colors (back- and forecolor) of a textbox that is disabled?

Locking the textbox isn't good enough because when it's locked, his events (lostfocus,validating,...) are still fired (and that i cannot have).
And i do need a textbox because some users can change the value of the textbox and others can't. (so using a label isn't an option)

Reason of this question is that i get complaints from my customers that a disabled textbox is hard to read on TFT-screens.

Any suggestions?
 
You can set the read-only property. Be sure to change the colors BEFORE you set ReadOnly to True... and that should do it.

Ben

There's no place like 127.0.0.1.
 
Also you could put some code in the EnabledChanged Event of the Textbox, to colour exactly as you please.


Sweep
...if it works dont mess with it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top