Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set focus without using setfocus()
Message
From
28/02/2004 17:22:07
 
 
To
27/02/2004 09:16:37
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00881299
Message ID:
00881819
Views:
32
>Hi!
>
>Don't use the Valid Event use LostFocus instead and then if you want to stay in that same control maybe your validation routine returns false then just setfocus back to the same control [This.SetFocus()]
>
>Sarosh

If I put two textboxes on a form. One with...
procedure lostfocus
if empty(this.value)
messagebox('Invalid')
this.setfocus()
endif

and the other with
procedure gotfocus
messagebox('Got me')

You will see that on tabbing out of box 1 you still get both messages and box 2 gets the focus anyway!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform