Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setfocus
Message
From
27/10/1999 12:57:29
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00282177
Message ID:
00282381
Views:
28
Thank you Mark.

>return .f. could generate a VFP error message. Use return 0 if you want the current control to retain focus.
>
>>whoops...sorry Jeff, but thanks.
>>
>>As soon as I hit the 'Send' button, I was like, "oh no, come back, come back!"
>>I realized what Barbara was saying. I need to 'return=.f.' there in the valid, not setfocus.... anyway....
>>
>>
>>>I'm not Barbara and She's glad that you could never confuse me for her but, you can not call the setfocus method from a valid event. You can however have it on the lostfocus. Becareful using it in this manner because you can get the user stuck on that object if they don't know what info would be considerd valid.
>>>
>>>HTH
>>>Jeff
>>>>Hi Barbara,
>>>>I put the setfocus() line in the valid of the field in question and it gave me, "Cannot call setfocus from within a when, valid, rangehigh or rangelow event." I have:
>>>>
>>>>If 'whatever'
>>>>thisform.mypageframe1.page1.txtname.setfocus()
>>>>endif
>>>>
>>>>?
"Live Well, Laugh Often, Love Much..."
Previous
Reply
Map
View

Click here to load this message in the networking platform