Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting focus to a grid's control
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00301225
Message ID:
00301591
Views:
41
>Hi Jim.
>
>>You were able to do it in VFP 3.0, but in 5.0 MS put the error in the valid.
>>
>>You can SetFocus from a LostFocus but if you fail to issue a NODEFAULT command then VFP will move focus at the end of the LostFocus making it seem like your SetFocus didn't work when it actually did work but focus was moved again after it.
>
>PMFJI, but I did find one instance of squirrelly behavior. You CAN issue a SetFocus() from the Valid() of a ComboBox and it works without an error. But as soon as you issue another setfocus() somehwere else down the line from a "legal" method, VFP complains that you cannot set focus from a valid.

Yes, thank you for reminding me! That was it - someone reported it here on the UT, and I was testing it some months ago. It even appeared to work to me for a while, until I added a textbox with a setfocus in some event that triggered the error.

So, it is a bug of sorts - it led one newbie developer to believe the Valid/Setfocus was actually supposed to work, and wondered why it didn't work elsewhere :)
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform