Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Use array as rowsource in drop down list
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00630923
Message ID:
00630932
Vues:
15
>Hi all,
>
>one of my drop down list (combol box) need to show information from a array named arrClass.
>My code:
>.rowsource='arrClass'
>.displayvalue=arrClass(0)
>..
>but the value cann't be displayed. Can someone please give me an example how to use array to display value in a drop down list?
>
>Linda

Hi Linda,

You should have something like that:
.rowsourcetype = 5
.rowsource = 'arrClass'
.Requery()
.Refresh()
.Listindex = 1 && if you want to show the first element in array
You cannot specify something like .displayvalue=arrClass(0) as arrays in VFP are not zero-based and always start with 1

Also, basically what is shown in combo depends on what your column Controlsource is and what that record value is. If the value is not in array the combo may just show nothing.
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