ImageList

  • Thread starter Thread starter Tam Inglis
  • Start date Start date
T

Tam Inglis

I need to populate a ListView and associate its LargeIconImage list with a
series of thumbnails.

I have a created a method that returns an ImageList. That seems to work. The
method takes a path and populates it with all the .jpg it finds there. All
images are 16x16. Ive stepped through the code and it adds the 5 images i
expect it to.

I then loop around and for the number of images and add a new item, setting
its image index to the loop counter. That should work. Am Stumped.

Much praise and thanks heaped upon anyone who can shed light :-)

this.imageListView.LargeImageList = FileHandler.getThumbnails(path);
this.ImageListView.View = System.Windows.Forms.View.LargeIcon;

ListViewItem lvi = null;
for (int i =0; i < imageListView.LargeImageList.Images.Count; i++)
{
lvi = new ListViewItem(i.ToString());
lvi.ImageIndex = i;
this.imageListView.Items.Add(lvi);
}
lvi = null;
 
Hi tam
do u have the soln
anushya
-----Original Message-----
I need to populate a ListView and associate its LargeIconImage list with a
series of thumbnails.

I have a created a method that returns an ImageList. That seems to work. The
method takes a path and populates it with all the .jpg it finds there. All
images are 16x16. Ive stepped through the code and it adds the 5 images i
expect it to.

I then loop around and for the number of images and add a new item, setting
its image index to the loop counter. That should work. Am Stumped.

Much praise and thanks heaped upon anyone who can shed light :-)

this.imageListView.LargeImageList = FileHandler.getThumbnails(path);
this.ImageListView.View = System.Windows.Forms.View.LargeIcon;

ListViewItem lvi = null;
for (int i =0; i <
imageListView.LargeImageList.Images.Count; i++)
 
Back
Top