Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return .f. in valid event
Message
De
03/08/1999 10:11:39
 
 
À
03/08/1999 08:29:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00249103
Message ID:
00249209
Vues:
23
>If your cancel button has it's cancel property set to .T., then it also set LASTKEY() to 27 when it is clicked. This menas you can code your valid event like:
>
>IF LASTKEY() <> 27 AND (SomeCondition)
>RETURN .F.
>ENDIF

Erik,

I think LASTKEY() isn't a good solution because if you try to quit the field using the mouse then LASTKEY() may be on 27, but this doens't mean you left the field using the escape key. I agree this solution works in conjunction with a cancel button, but if the user doesn't want that you have a problem ...

This is the solution that I usually use : the valid condition of individual fields always accepts an empty field. When the OK button is pressed, I check for empty fields that must be filled and refuse to continue if there are ...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform