Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transfer focus to previous control with focus after use
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00322283
Message ID:
00322332
Views:
24
You are correct in a round about sort of way.

1.) Create a property on your form that will hold a "pointer" to the last object that had focus. For example: oLastObjFocus

2.) In each controls WHEN event, have this piece of code:
thisform.oLastObjFocus = THIS

3.) After you execute your command button code, you have a piece of code like:
thisform.oLastObjFocus.SetFocus()


-Mark


>Is it possible to add the property to my navbutton class instead of the form to hold the object reference? I want to try to keep my classes as self contained and reliant as possible. If so, would this work?
> Thisform.(This.LastObjFocus).SetFocus
>Where This.LastObjFocus is the property and set to the name of the last object with focus provided by WHEN.
>If my syntax is ridiculous above, please excuse me. I get a little lost in dot notations especially in combination with (), m., and & usage. Thanks
Previous
Reply
Map
View

Click here to load this message in the networking platform