Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Esc from textbox or editbox - loosing characters
Message
 
 
À
31/08/1998 19:25:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00131731
Message ID:
00131952
Vues:
14
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform