1 Replies - 12052 Views - Last Post: 15 October 2009 - 06:19 AM Rate Topic: -----

#1 Guest_NIXZ*


ListView With Icons (Images) Like Windows Explorer

Post icon  Posted 15 October 2009 - 06:08 AM

How? I mean windows explorer uses this method.
I know that i have to drag and drop the ListView control from the Control Box into my form
Then goto Properties and choose view: LargeIcons/SmallIcons.
Then what? I know the code to add an item into the listview ( subitems included ) but i dont know how to
make each one have an image. example:
Posted Image

This post has been edited by NIXZ: 15 October 2009 - 06:09 AM

Is This A Good Question/Topic? 0

Replies To: ListView With Icons (Images) Like Windows Explorer

#2 motcom   User is offline

  • D.I.C Lover
  • member icon

Reputation: 293
  • View blog
  • Posts: 1,371
  • Joined: 16-June 08

Re: ListView With Icons (Images) Like Windows Explorer

Posted 15 October 2009 - 06:19 AM


First you will need 2 image lists, one for big icons and one for small icons.

Assign them the proper icons and note the index of the icons.

Next assign the properties of the "SmallImageList" and "LargeImageList" from the list view to the image lists you created.

now when you add your item to the listview, give the item the image index from the image lists


lstGroups.Items("whateveritemname").ImageIndex = 2

make sure the icons/images in both image lists are in the same order....
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1