General information
Category:
Forms & Form designer
>The foxpro online documentation uses MyListBox.picture as an array, which VFP wont allow. The sample code does not seem to work. Also, help does not list ListBox as a control that supports the picture property, even though it appears on the property sheet.
The Picture property is in fact an array and can be referenced as one.
>This code: MyList.picture = "pic.bmp"
>results in a picture next to every row.
Because the filename is being stored to every element of the array, just as it would have been with a normal array reference without subscript operators.
>References such as Mylist.picture(2) result in an error.
You need to use square brackets instead of parentheses. MyList.Picture(2) looks to VFP like a method call, where MyList.Picture[2] looks like an array element reference.
Note that there are limitations to putting pictures next to items in a list, the biggest one being that if your RowSourceType is anything other than None, VFP uses a buffering mechanism for the pictures that holds about 60 pictures. So if your list will have near or more than 60 items, you'll have to use a RowSourceType of None.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only