Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I display a bmp next to some ListBox rows?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00117892
Message ID:
00117902
Vues:
22
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"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform