Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with SetFocus method!
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Problem with SetFocus method!
Miscellaneous
Thread ID:
00011060
Message ID:
00011060
Views:
81
I have a form with two textboxes (Text1 & Text2) and two commandbuttons (Command1 & Command2). Set the tab order to the following: Command1, Text1, Command2, Text2. Set the enabled property for Text2 and Command2 to .F.. I have the following code in the Click event of Command1:
THISFORM.Text2.Enabled = .T.
THISFORM.Text1.Enabled = .F.
THISFORM.Command2.Enabled = .T.
THISFORM.Command1.Enabled = .F.
THISFORM.Text2.SetFocus()

When I run this form and press the Command1 button the focus jumps to the command2 button. However, when I step through the code in the trace window it seems to work ok.

Any ideas?
Shane Murdoch
Next
Reply
Map
View

Click here to load this message in the networking platform