Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LostFocus vs. Valid in Comboboxes
Message
From
23/09/1999 10:22:33
James Boden
Software Solutions For Business
Cumberland, Maryland, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00264458
Message ID:
00267959
Views:
33
Jim,
I am having this same problem.
I have followed this information and am now confused.
I have a combo box that they pick a name. I want to force them to the next combo box to select a company. I have a setfocus in the lostfocus of the name box that says thisform.companybox.setfocus.

Where does that NODEFAULT statement come into play at that you are talking about below?

Thanks Jim Boden
________________________________________________________________________________
>Kile,
>
>The solution to this problem is really pretty easy when you see it. Valid determines if focus will ba allowed to elave or not through its return value. If the Valid says it is ok to leave then LostFocus decides where to go (setfocus).
>
>The only gotcha there is is that you must know that LostFocus does an implicit SetFocus after your code runs to set focus to the next control in the tab order, whihc, of course, will over ride yours. When this happens it looks like your SetFocus didn't work, but, in fact, it did. it is just that after focus went where you told it to go, the implicit one moved focus to where it wanted to go.
>
>The solution is, if you SetFocus in a LostFocus you must also issue a NODEFAULT to prevent the implicit SetFocus from occuring.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform