Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to populate a listbox
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01086295
Message ID:
01086314
Views:
12
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform