Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
*storing* active control
Message
De
21/11/1996 06:38:31
 
 
À
21/11/1996 03:30:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00012972
Message ID:
00012974
Vues:
34
>in the when event of a button I can see what other control may currently have focus by using THISFORM.ActiveControl.Name
>
>I need to be able to *store* this control so that after the button does it's thing i can set the focus back to that previous control.
>
>I'm coming up empty. How does one do this?

You can...
1. In the second control say in the Valid event: Return -1 wich will go back
2. Add a property to the form (PrevControl)
  Control1.LostFocus():
    ThisForm.PrevControl = "ThisForm."+AllTrim(This.Name)+".SetFocus()"

  Control2.Click() (Or anything you want):
    = Evaluate(ThisForm.PrevControl)
Alexandre Nobre
Alpha Bytes Computer Corp.

Did you know that there are innocent people dying in East Timor?
It helps if you do...

I suppose you don't need glasses if you're able to read this line

Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform