Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding data to a bound combo box
Message
De
25/03/2001 07:03:10
 
 
À
24/03/2001 20:54:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00488389
Message ID:
00488428
Vues:
14
Hi Bill.

>> Then in the combo's LostFocus ( or possibly Valid ) event you cant test on the combo's Value and DisplayValue properties. If they are not the same, a new value was typed in by the user. You can then run code to take whatever action is necessary, e.g. add the new value into the combo's list <<

This strategy only works if the combo's BoundColumn is column 1. A better strategy would be to test for:
IF NOT EMPTY( This.DisplayValue ) AND This.ListIndex = 0
   *** The user typed in a value not in the combo's list
   *** Take action to add the item to the list
   *** And don't forget to requery the combo
   This.Requery()
ENDIF
This will work regardless of which column is the BoundColumn.

Marcia
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform