>>>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