Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to setfocus back to previous text box
Message
 
 
À
18/10/2004 00:34:39
Hee Lim Wang
Fantasy Software Enterprise
Malaisie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00952191
Message ID:
00952192
Vues:
15
>Can any one tell me how to set the cursor back to previous text box after I click a command button which is not in tab order ?

You would need to create a form's property oLastActiveControl.

In the When event of command button you would write something like
if type('thisform.ActiveControl')='O' and not isnull(thisform.ActiveControl)
   thisform.oLastActiveControl = thisform.ActiveControl
endif
In the command button click you would put after all other code
if not isnull(thisform.oLastActiveControl)
  thisform.oLastActiveControl.SetFocus()
endif
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform