Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Restoring the focus
Message
From
20/04/1998 23:01:35
 
 
To
20/04/1998 21:27:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00093549
Message ID:
00093567
Views:
29
>Hi,
>
>I want to set the focus back to the previous active control
>when a button is pushed.
>
>How can I know which is the previous active control?

nD=THIS.TabIndex && The current controls order # on the form
cN=THISFORM.Controls(nD-1).Name && Name of the previous control in tab order

THISFORM.Controls(nD-1).SetFocus() && Set Focus to the previous control
THISFORM.Controls(nD-1).Value = "HI" && Set a value for the previous control


Hope these examples help.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform