Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SetFocus in When event.
Message
 
À
02/07/1999 03:00:37
Salminen Jukka
Js Software Systems
Vaasa, Finlande
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00235715
Message ID:
00236821
Vues:
21
>>You can use the GotFocus and when calling a setfocus also issue a NODEFAULT.
>
>Could you give some examples where/why NODEFAULT should be used. I'm also new to VFP>3.
>
>Jukka Salminen

Jukka,

NODEFAULT prevents the VFP default behavior from occuring. For example, in the QueryUnload the VFP default behavior is to destroy the form. If you don't want the form destroyed you must issue NODEFAULT.

In the GotFocus the default behavior is to set focus to the object, if you don't want focus there you need to issue a NODEFAULT. Why is it needed? Because the VFP default behavior occurs after your code. So in the GotFocus example, your code would set focus to some other control, but then VFP would set focus to the current one after your focus move. This would make it appear like your SetFocus call was ignored when, in fact, it was not ignored just overridden after.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform