Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox never gets focus
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00126124
Message ID:
00126180
Views:
22
Tim,

It's usually because the rest of the code in the baseclass ends up bringing focus back to the first control when it executes at the end of the overridden method code. You should probably explicitly execute the baseclass behavior first and then SetFocus:

textbox::SomeMethod() && do the baseclass behavior now
nodefault && prevent automatic call to baseclass behavior from
&& executing at the end
* more code here
textbox2.SetFocus()

>I put NODEFAULT in the keypress of mytextbox1 so no mytextbox2 receives the focus like I intended. Why does all the "thisform.mytextbox2.setfocus" in the World have no effect then?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform