Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
List box..force to particular item
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00297286
Message ID:
00297932
Vues:
30
>Hi Nick.
>
>>> Just to add: I always use listbox.DisplayValue for this purpose, because .Value and .DisplayValue may be different, and I want to make sure that I set the property which I actually can see in the listbox. <<
>
>
>Since, in this case, the listbox has a RowSourceType of either 2-Alias or 6-Fields this is totally unnecessary. Setting the listbox's value will move the record pointer in the underlying data source and take its DisplayValue from whatever has been defined as the first column of the RowSource.
>
>Marcia

Hi Marcia,

I agree that in this case setting the .Value will move the record pointer and change the .DisplayValue, but changing the .DisplayValue will also move the record pointer and change the .Value.
So, as in this case they provide exactly the same result, my approach will not hurt anyway. :)

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform