Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Textbox never gets focus
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00126124
Message ID:
00128184
Vues:
24
>>>>I have a textbox2 which never receives the focus when textbox1 explicitly says thisform.mytextbox2.setfocus in several of its events.
>>>>instead, a cmdbutton gets the focus. I have even blanked out all of textbox2's events. I have to actually place the cursor manually with the mouse into textbox2 to give it the focus.
>>>
>>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?
>Timothy,
>
>Because in the process of setting focus where you said to, VFP fires the current textbox's LostFocus and the default VFP behavior in LostFocus is to put focus in the next control according to the key used to leave this control (the default when no key was used is to put focus in the Next control in the tabe order. You need to do your setfocus ion the textbox's LostFocus and also issue a NODEFAULT.
ok, thanks.
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform