Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VALID=.F. except when you press CANCEL?
Message
De
14/01/1999 18:00:55
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00176248
Message ID:
00176251
Vues:
27
>In many situations, I'll want a user to stay in the current field until they enter a valid value - OR - until they press the CANCEL button! I know that I can keep them in the field by returning .F. in the VALID method, but how can I account for that CANCEL button?
>
>TIA

If your Cancel button has Cancel=.T. then Lastkey() will return 27 when the button is pressed, just as if the user pressed Esc.
So put
IF LASTKEY()=27
   return .T.
endif
in your Valid event
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform