Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it possible to disable tab key
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00124536
Message ID:
00124815
Views:
23
>>>>is it possible to disable tab key, or other keys for that matter?
>>>
>>>Timothy,
>>>
>>>In a form class set the KeyPreview property to .T. and put this in the KeyPress;
>>>
>>>
>>>IF nKeyCode = 9
>>>   NODEFAULT
>>>ENDIF
>
>>well what I am getting at is that when a textbox receives the focus, the users should onlt be allowed to hit enter or click on QUIT. There are other controls but if user clicks on them, trouble occurs. I'd hate to issue disables all over the place then enabled them afterwards, alot of code.
>
>Timothy,
>If you have many controls that require this, make them a subclass of your base textbox and add code to the WHEN and LOSTFOCUS events that disables/enables the command buttons. Why is < enter > OK but not < tab >?
>
Barbara, I have cut/pasted a section of the form containing a label,a textbox and and cmdbutton. I saved that as a control into mytoolbar.vcx.Now I can refer to it as one thing. Is this the way to go about it?
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform