Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Program Error - Cannot call SetFocus from within ...
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00120667
Message ID:
00130189
Views:
61
>>realize this was discussed last month. but it is relevent to my work today. in my valid i also want to setfocus. a little confused about the "on error". i tried this and still got the vfp error message. do i have to "on error" something to throw away the vfp runtime error?
>>
>>
>>GRID1.COLUMN3.VALID
>>do column4_valid
>>this.column4.setfocus() && get vfp runtime error
>>
>>
>>PROCEDURE COLUMN4_VALID
>>on error && did not say anything else
>>return
>>
>>thanks - brenda
>>
>>Brenda,

>You canno0t call setfoucs form Valid or When at all absolutely ever under any conditions. >You need to do the SetFocus call in the Control's LostFocus evetn for the control in the >column. Using the Lostfocus event you also need to issue a nodefault command as in;

>* Column.Text1.LostFocus
>THIS.Parent.Parent.Columns(1).SetFocus()
>NODEFAULT

worked like a charm. thanks. do wonder about the nodefault. i have used it on several occassions (like double click on toolbar not to undock), but have never understood its definition. online help was not very helpful when i looked it up. what is the general definition and use of nodefault?

brenda
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform