Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Enter in a text box
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00393414
Message ID:
00393728
Vues:
28
>I use the keypress event more often for 2 reasons. You can't setfocus to a control from valid() and valid() fires whenever the control loses focus, which is rarely a desired behavior. The valid event is best used when checking for a condition that you cannot allow the user to escape from at any time no matter what.

Eric,

This isn't totally correct. First, by returning a numeric value from Valid() you can control which item next gets the focus. For example, returning -1 sets moves the cursor to the previous control. Returning 2, skips the next control in the tab order and moves the cursor to the one following it, and so on. It is true, however, that you cannot call SetFocus() from it. Second, Valid() doesn't fire when the control loses focus it fires before it loses it. LostFocus() fires when the control loses focus.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform