Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling SetFocus() from within GotFocus()
Message
 
 
To
23/08/2004 15:43:42
Jim Foderaro
Insurance Rating Systems, Inc.
Universal City, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00935703
Message ID:
00935707
Views:
17
This message has been marked as the solution to the initial question of the thread.
Jim,

Why do you need to SetFocus() if you're already in the GotFocus()? You can use endless loop to stay in GotFocus() and exit when conditions are right.

>I have a text box control that calls a FORM when the txtbox getsfocus (from inside the GotFocus event) IF a certain var is .t. Depending on what the 2nd form returns I want to go forward to the next control or stay right where I am and start over. My problem is that when I do a thisform.txtbox.setfocus from within that txtbox's gotfocus event it does not re-enter the gotfocus at the top where I check the var for .t. See Below:
>
>txtbox.gotfocus event
>
>
>if mfirstime = .t.
>    mfirstime = .f.
>    do form "another form" with mslctok
>    if mslctok = .f.
>        mfirstime = .t.
>        thisform.txtbox.gotfocus   <=== Does not return me to "if mfirstime"
>        ...
>
>
>There must be a way to "loop" back to the beginning of the gotfocus event?
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform