Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding an item in a combobox
Message
De
28/02/2003 06:56:12
 
 
À
27/02/2003 17:08:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00759125
Message ID:
00759308
Vues:
27
>Is it possible to allow the user to enter a new value in a combobox by selecting certain value from its list? Like if the user selected "NEW VALUE" from the combobox list, the program will then allow the user to enter a new value, display the value being typed by the user and add the new value in the list afterwards. Is this possible or if the user selected "NEW VALUE", I have to call another form where the user can enter the new value to be added to the list?

I don't think you can do what you describe in place, that is, having the user choose "NEW VALUE" and then just be able to type the new value.

You have two choices. One is to open a form when the user chooses "NEW VALUE." The easier choice is to set the combo's Style to dropdown combo rather than dropdown list. Then, the user can simply type a new value into the textbox portion of the combo. You will need some code to add the new item to the list. The specifics depend on the RowSourceType of the combo, but you can detect this situation by comparing the combo's Value to its DisplayValue.

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

Click here to load this message in the networking platform