Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Which control had focus ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00768954
Message ID:
00768956
Vues:
22
>I have a checkbox in a form that has TabStop set to .F. . When the checkbox
>is changed by clicking with the mouse i want to set focus back to the object
>that was active before. I have put a Nodefault in the GotFocus of the checkbox,
>so the focus is moved to another control. But how do i code to put
>the focus back to the previous active control ?

You can save refrence to the previous control in the When and set focus to it in the GotFocus()
* Checkbox When
Thisform.oPrevControl = Thisform.ActiveControl

* Checkbox GotFocus
NODEFAULT
Thisform.oPrevControl.Setfocus()
You'll have to add check that Thisform.ActiveControl has valid value.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform