Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding images to listview

Status
Not open for further replies.

aspro

Programmer
Jan 22, 2003
69
AU
Hey
I have my listview at the moment with the columns- Name Date and Status. I would like my 4th column "Flag" to have a little flag image in the row but i am not sure how to add images to the listview.
Any help in this area would be great.
Thanks in advance,
aspro
 
If there is no way to add a picture then I suppose a flag from wingdings will do. But how do I make one column's font wingding without changing the font of the entire listview?
 
You can add an image. In help, look up the article titled "Displaying Icons for the Windows Forms ListView Control"

I tried it, with this code, using jpegs:

Code:
ListView1.SmallImageList = ImageList1
ListView1.Items.Add("Hello")
ListView1.Items.Add("World")

Dim li As ListViewItem
li = ListView1.Items(1)
li.ImageIndex = 0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top