Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
*storing* active control
Message
From
21/11/1996 06:38:31
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00012972
Message ID:
00012974
Views:
30
>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

Previous
Reply
Map
View

Click here to load this message in the networking platform