Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ActiveControl
Message
From
06/06/2005 20:12:30
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
 
To
06/06/2005 18:54:42
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
01020689
Message ID:
01020699
Views:
21
Geoff,

The way I do it is to put code in the lostfocus event of my controls that stores the object in a form property call oLastfocus. Then I can evaluate oLastfocus when I need to.
procedure lostfocus()  && textbox lostfocus
thisform.oLastfocus = this
endproc 
>Hi
>
>I am having problems with the ActiveControl property. I need to know which control had focus prior to a command button being clicked. I thought I would use BINDEVENTS to bind the GotFocus event of all the controls and then use the form's ActiveControl property to determine what control had focus.
>
>Unfortunately, I always end up with Thisform.ActiveControl not evaluating to an object,
>
>Why is this and how can I determine which control has focus?
>
>Regards
>Geoff Scott
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform