Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to populate a listbox
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01086295
Message ID:
01086314
Vues:
14
>In my form I have this example for testing: but it never gets populated, can you tell me why?
>
>DIMENSION gaMyArray(5)
>FOR gnCount = 1 to 5
>   STORE gnCount TO gaMyArray(gnCount)
>  NEXT
>thisForm.List1.RowSourceType = 5
>thisForm.List1.RowSource = "gaMyArray"
>thisform.list1.additem(gaMyArray(1,1))
>thisform.list1.additem(gaMyArray(1,2))
>thisform.list1.additem(gaMyArray(2,1))
>thisform.Refresh
>thisform.list1.Requery()
>?thisForm.List1.Value
If you're using AddItem, you should not use array, but rather a value as RowSource. If you want array, make it a property of the listbox (you can use AddProperty) and don't use AddItem. Make your choice <g>
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform