Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to setfocus to 1st control
Message
From
01/09/1999 00:28:26
 
 
To
31/08/1999 23:49:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00260015
Message ID:
00260020
Views:
12
John ---

In my default form class, I have a property called FirstControl. I put the whole object heirarchy there at design-time (such as THISFORM.txtFirstName). In the Init of the Form class, I have

IF !EMPTY(THIS.FirstControl)
cControl=THIS.FirstControl
&cControl..SetFocus()
THIS.Refresh()
ENDIF

Works like a champ.

> How could I setfocus to 1st control in my form? I tried to use myform.controls(1).setfocus, but it still stay in the control focused previously...
>
>Thank you
------------------------------------------------
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