Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I tell what object on a form has the current focus
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00288577
Message ID:
00288696
Vues:
24
>Is there something to tell me what object currently has the focus? We are currently setting a flag with gotfocus and lostfocus but it seems to be that there must be something in VFP itself to tell me.
CHEAP TRICK 33
public ThisControlHasFocus

in the controls Gotfocus:
ThisControlHasFocus=this.name

in the control's Lostfocus:
ThisControlHasFocus=[None]

Of course, if your triggering off another control with this method and the trigger has this implemented, then ThisControlHasFocus will be the trigger!

Like ed says, and it took me a few hours to learn, the concern is where the user is, so ..

Use control validations (valid,lostfocus,interactivechange) to assure that all the ducks are in a row, then allow with (enable and when) to push the process forward!

TT
Imagination is more important than knowledge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform