Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dropdown list
Message
 
À
07/01/1997 04:11:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00016377
Message ID:
00016867
Vues:
41
>>BTW, sometimes it's good to set both Value and DisplayValue properties.
>
>Yes, I've noticed that too.
>
>Do you have any rules or guidelines for when you use Value and when DisplayValue?
>
>I haven't done enough research to find a pattern in the behaviour.

Value and DisplayValue are different only if your ListBox or ComboBox is bound to a different column of data than the one being displayed. When this is the case, Value refers to the bound value, and DisplayValue refers to the displayed value.

So, for instance, if you create a ComboBox (MyCombo) with RowSourceType = 6-Fields, and RowSource = "MyCursor.Name, Customer_Id", and BoundColumn = 2, then "MyCombo.Value" will return Customer_Id, and "MyCombo.DisplayValue" will return Name. Note that any numeric data is converted to string format.

Mark
=========================
Mark A. Peter
Los Angeles, CA
mpeter@primenet.com
=========================
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform