Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can not press ESC when the field valid is .f.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00107833
Message ID:
00108482
Vues:
47
>Barbara,
>
>Agreed, you will have to bypass the valid. The valid event fires before the control loses focus, not when the cursor is in the field. Pressing the Esc key does not cause the control to loose focus (Unless there is there is an easy way I missed) therefore valid() has not yet fired. Since you have to use the Tab, arrow key, mouse click, etc. to force the control to loose focus the lastkey() would not return the Esc key code 27. At least this is my perception.
>
>Regards,
>Mike

True, Mike, except that in this case ESC was to be used to exit the form without changing anything. Most likely, then, the 'CANCEL' button (or equivalent) would be set so that its Cancel property was TRUE. In this case, clicking ESC from any control changes focus to the Cancel button, firing the valid property of the active control.

If CANCEL is not TRUE on any command button and it is not specifically covered in the form KeyPress, ESC will leave you hanging - still on the control but no action taken.
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform