Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How did the object got focus?
Message
 
 
To
07/10/1997 17:18:16
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00053481
Message ID:
00053636
Views:
23
>>>Is there a way to know how did an object got focus?, in other words, If the object got focus by beeing tabbed in or by a mouse click?
>>
>>Hi, Jorge
>>
>>If you check on READKEY() in your GotFocus event. You can also combine READKEY() and LASTKEY().
>
>Jorge- you could create a custom propoery for the textbox... something like 'wasclicked' and in the click event set it to .T., and in the lost focus, set it to .F. again. Then just check wasclicked in the gotfocus event to see if it was clicked or not. HTH

Erik:

Thanks a lot for your tip, but that won't do the job in my case. I made several tests based on your sugestion and I found out that the event firing sequence is:
1) Object's When
2) Object's GotFocus
3) Object's Click.

So the click comes after the events I want to trap for. I need to know either in the When or in the GotFocus event if the mouse was used to click in the object or if it was tabbed in. Any other sugestion?
Jorge Flores
From the Amigo Country
Previous
Reply
Map
View

Click here to load this message in the networking platform