Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Controlling focus
Message
De
16/12/2005 17:19:31
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Controlling focus
Divers
Thread ID:
01078835
Message ID:
01078835
Vues:
49
Problem:

A textbox contains code in its lostfocus event to click a button.
if lastkey()=13
thisform.cmdSearch.click()
endif
The click event of the button runs a procedure and returns focus to the textbox.
thisform.findrec()
thisform.donstextbox1.SetFocus()
This works properly when the button is clicked with the mouse but does not work when the click is called from the textbox. Instead of returning focus to the textbox, focus goes to the next control in the tab order.

I tried calling the button.click from textbox.valid but this produces an error that says a setfocus cannot be called from a valid.

Any suggestions?

Thanks
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform