Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Lost Focus Or Valid ?
Message
De
23/07/2000 15:37:17
 
 
À
23/07/2000 05:09:39
Tan Aik Jin
Aranea WebLab Sdn Bhd
Kuala Lumpur, Malaisie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00395960
Message ID:
00396000
Vues:
7
I use the LostFocus Event.

The reason is that certain validation rules may require the use of a dialog box. If the dialog box uses SetFocus(), an error will occur - you cannot use SetFocus() when called from the Valid Event even if the Valid Event instantiates a form which uses it. You also gain more control over WAIT WINDOW messages, because FoxPro has it's own funky WAIT messages when Valid() returns false.

If you put your validation code in the LostFocus Event, you can use SetFocus() in a called dialog. If the validation fails (e.g. returns .F.), issuing This.SetFocus() in the LostFocus Event returns focus to the control. If I rememeber correctly, NODEFAULT does not return focus in the LostFocus Event.

>For data validation or certain rules validation, do you code in LostFocus() or The Valid() event ? Why do you choose one over another ? Does it offers any superior functionality ?
- Jeff
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform