Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Esc from textbox or editbox - loosing characters
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00131731
Message ID:
00131952
Views:
15
>On a form I have the keypress event look for the Esc key and then release the form - this is fine unless the user was editing a text or edit box - then any chnges to the field are lost.
>
>Can you force a TAB character before the form.release?
>
>thanks in advance.

The default for pressing the Esc key while in a textbox is to revert the value of the textbox to what it was upon entering the textbox.

If you do not like this, you could modify the keypress() of your framework's base textbox class:
IF nKeyCode =27
NODEFAULT
ENDIF

If you do this, you should also probably set the KeyPreview property of your framework's base form class to .T.: this allows the form to handle "ESC" before the control it is pressed on ignores it.
Rick Hodder
MCP Visual Foxpro
C#, VB.NET Developer
Independent Consultant
www.RickHodder.com
MyBlog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform