Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox picture property
Message
From
21/01/2002 19:15:06
 
 
To
21/01/2002 17:02:58
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00607926
Message ID:
00608136
Views:
20
>This works but when I click on the list, all the pictures change to the default picture. As long as I don't click on the list, each item can have a different picture.
>
>What am I doing wrong?
>Mylistbox.Rowsource = "mycursor.field"
>Mylistbox.Rowsourcetype = 2
>IF condition
>THISFORM.Mylistbox.Picture[n] ='IMAGES\image1.BMP'
>ELSE
>THISFORM.Mylistbox.Picture[n] ='IMAGES\image2.BMP'
>ENDIF
>

Nothing is wrong with your code, as Marcia already said that this is standard behavior for VFP. This is true but only if you use this against table/cursor.

The workaround for this is to use array. Add property to your form say "MyArray[1,0]" then populate the table into thisform.myarray
Mylistbox.Rowsource = "thisform.myarray"
Mylistbox.Rowsourcetype = 5

Hth
Herman
Previous
Reply
Map
View

Click here to load this message in the networking platform