Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo box just won't keep hand entered text
Message
 
 
À
17/02/2005 08:34:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00987581
Message ID:
01134444
Vues:
24
>Combobox, setup with builder, keeps pick list values (one column) fine but not keyboard entered data, it just won't retain. Has to be something simple as all combobox documentation suggests you can keyboard or pick from the list.
>
>As the others have said, if you type in a value that is not in the combo's internal list, you must take specific action in the combo's Valid() to add the new value to the list. How you do this depends on the RowSOurceType of the combo. For example, with a RowSOurceType of 2-Alias ot 6-Fields, you need to add the record to the underlying cursor and then reuqery the combo like so:
>
>
>IF NOT EMPTY( This.DisplayValue ) AND This.ListIndex = 0
>  *** The user typed in something that is not in the combo's
>  *** list. Take action here to add the entry
>  INSERT INTO SomeTable ( SomeField ) VALUES (This.DisplayValue )
>  This.Requery()
>ENDIF
>
Marcia,

What if the user typed the new value, then re-typed? The wrong new value would be still in the list...
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform