Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I want to stay on a field?
Message
De
12/09/1997 10:05:43
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00049609
Message ID:
00049822
Vues:
57
>>>How do I send the FOCUS back to a field from a VALID?
>>RETURN .F. or RETURN 0 or RETURN [tabordernextfield of interest]
>>It's easy to get trapped in WHEN/VALID now so I try to only got/set/lostfocus and use the lostfocus event for validation and repositioning. Usually any gotfocus() code is ok to prime the field for the user (i.e. reset to empty/null/default this.value stuff)
>>HTH
>Gary,
>
>Here's my take on When/GotFocus and Valid/LostFocus
>
> WHEN: Decide if the user should be allowed in this control at all (ONLY This do not set up control here)
>
> GOTFOCUS: SEt up control for focus (if this event fires the user is in because they passed the When test)
>
> VALID: Decide if the user will allowed to leave this control (Do NOT react to their leaving here)
>
> LOSTFOCUS: React to the focus leaving this control (because if this event fires they have passed the Valid test)
>
>This is not an either or situation, it is best to make the proper use of all four events. To make proper use one needs to know the event sequence;
>
> Moving to a control:
>
> WHEN If When test is passed ------> GotFocus
> If When test failed -------------> When of next control
>
>
> Moving off of a control:
>
> VALID If Valid test passed --------> LostFocus
> If Valid test failed -----------> Focus remains in this control (LostFocus does NOT fire)
Very good point. I think that a lot of us fall into the OR decision and forget that we can simply flag the state of the control and process in the got/set
TIA
Gary
Helping Make Ideas Reality
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform