Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Move focus from toolbar textbox to active form control
Message
De
07/06/2005 16:03:30
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Move focus from toolbar textbox to active form control
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01021089
Message ID:
01021089
Vues:
91
Is there anyway to change focus from textbox on a toolbar to the currently active control of the active form?

For example, I have a textbox on a toolbar for searching. When the user hits Enter, I would like to return them to the active control on their active form.

I use KeyPress to detect Enter key, but I can't seem to get focus to leave my toolbar unless I release the toolbar itself.

Here's how I'm trying to return focus back to my active control:
if type( "_Screen.ActiveForm.ActiveControl.Name" ) == "C"
  activate window (_Screen.ActiveForm.Name)
  _Screen.ActiveForm.ActiveControl.SetFocus()
  set message to "Setfocus() to " + _Screen.ActiveForm.ActiveControl.Name
else
  set message to "No activecontrol to set focus to"
endif


Any ideas?

Malcolm
Malcolm Greene
Brooks-Durham
mgreene@bdurham.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform