Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AfterSelected - Combobox ?
Message
 
 
À
17/04/2001 16:06:12
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00496351
Message ID:
00496376
Vues:
11
>What Event to use to ThisForm.Text1.SetFocus() after the combobox has been selected (by mouse or keyboard)? In other words, after picking the item from the combobox list, I want to take the cursor to the entry box (Text1).
>
>Thanks.

Your best be is in the LostFocus. If the text box is before the combo in your Tab order, then your users will never be able to tab through all the form controls. As soon as they hit Tab in the combobox, they will be sent backward to the text box. THis can be very annoying and frustrating to a user.

If I were you, I would only do this if the value of the combo box is changed from its value when the user entered the control. Use the GotFocus to set the current value, then check the value of the combo in the LostFocus.
Procedure GotFocus
if not pemstatus(This, 'cOldValue', 5)
   This.AddProperty('cOldValue', '')
endif
This.cOldValue = alltrim(upper(This.DisplayValue))

Procedure LostFocus
if alltrim(upper(This.DisplayValue)) <> This.cOldValue
   This.Parent.TextBox.SetFocus()
endif
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform