Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exiting a Textbox Validation
Message
De
23/03/1999 13:24:48
 
 
À
23/03/1999 11:43:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00200980
Message ID:
00201061
Vues:
12
>If I hit the escape key the textbox still has focus and
>when I attempt to move off it the valid fires. This is
>somewhat of a recursive issue.

To expand on Edward's answer:

When your form has a button whose cancel property is set to .T., this button is clicked when the user hits cancel anywhere on the form. But what is not obvious is that clicking this button with the mouse also sets the value of LASTKEY() to 27. So this covers all of your bases. In your valid event, use code like this:
IF !LASTKEY() = 27
   IF This.Value > This.Parent.txtdpayment.value
       MessageBox('Deposit date > Payment date',0)
       RETURN 0
   ENDIF
ENDIF
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform