Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ComboBoxes
Message
De
02/05/2003 16:14:41
 
 
À
02/05/2003 14:27:15
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00784280
Message ID:
00784361
Vues:
15
I have a combobox that allows the user to add to the list it's attached to. When I enter a new item and tab off the combobox the display value is empty, but I the new item to be the one that is selected. Is there a setting to do this or do I have to write code for this?

You have to write code to add the newly entered value to the list's RowSOurce. Code like this in the valid should do it for you:
IF This.ListIndex = 0 AND NOT EMPTY( This.DisplayValue )
   *** Code here to add the entry to the underlying data
   *** If the RowSOurceType is 2-Alias or 6-Fields, this means 
   *** Adding the new item to the table from which the list
   *** gets its Data
   *** Then requery the control's internal list
   This.Requery()
ENDIF
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform