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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textbox enabled Prevent it from grayed out

Status
Not open for further replies.

DUF

Technical User
Mar 10, 2001
107
IE
When the enabled property of a textbox is set to yes how can I stop it been grayed out
I want the textbox to remain the same as a normal textbox.
I have developed a touchscreen program and I do not want the user to enter the textbox. Usinf the |Lock property will not work.
any ideas

duf
 
If the both the field's Enabled property AND Locked property are set to "Yes", the field should display as normal, but will not allow the user to make any changes in it. If you want to prevent the user from tabbing into the field, set the "Tab Stop" property to "No". If you want to prevent the user from entering the field via a mouse click, create an event procedure in the On Enter event of the field, and insert code to set the focus to another field - perhaps to the field that would be next in the tab order (if this field were a tab stop field). The code will look something like this:

Code:
Me![myFieldName].SetFocus

HTH...

Ken S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top