Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to setfocus back to previous text box
Message
 
 
To
18/10/2004 00:34:39
Hee Lim Wang
Fantasy Software Enterprise
Malaysia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00952191
Message ID:
00952192
Views:
14
>Can any one tell me how to set the cursor back to previous text box after I click a command button which is not in tab order ?

You would need to create a form's property oLastActiveControl.

In the When event of command button you would write something like
if type('thisform.ActiveControl')='O' and not isnull(thisform.ActiveControl)
   thisform.oLastActiveControl = thisform.ActiveControl
endif
In the command button click you would put after all other code
if not isnull(thisform.oLastActiveControl)
  thisform.oLastActiveControl.SetFocus()
endif
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform