Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I display a bmp next to some ListBox rows?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00117892
Message ID:
00117902
Views:
23
Thanks. I'm getting closer.

Here is the example code:

FOR iItem = 1 TO THIS.ListCount && files start at the 5th item
cExtension = UPPER(RIGHT(THIS.List(iItem),3))
DO CASE
CASE cExtension = "DBF"
THIS.Picture(iItem) = "tables.bmp"
CASE cExtension = "BMP"
THIS.Picture(iItem) = "other.bmp"
CASE cExtension = "PRG"
THIS.Picture(iItem) = "programs.bmp"
CASE cExtension = "SCX"
THIS.Picture(iItem) = "form.bmp"
OTHERWISE
THIS.Picture(iItem) = IIF("]" $ cExtension, ;
"", "textfile.bmp")
ENDCASE
ENDFOR


*** Note that they use parens and not brackets. When I use brackets, an error is not generated, but nothing else happens. Perhaps I have to set some other properties?

In my listbox init method, this works on all rows:
This.Picture = "c:\vcs4.0\gui\bitmaps\clock.bmp"

But this has no effect:

This.Picture[1] = "c:\vcs4.0\gui\bitmaps\stop.bmp"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform