Click to See Complete Forum and Search --> : Icons and listview.
{FPP}
Feb 13th, 2006, 05:37 PM
HI, i am trying to load a list of files and paths into a listview, and then have a little icon of the fileicon next to it. How would i do this. I should use this (lin below) code to get the icon, but im not sure how to place it next to the aprropate item in the listview.
http://www.codeguru.com/csharp/csharp/cs_misc/icons/article.php/c4261/
MrPolite
Feb 13th, 2006, 05:50 PM
insert the icons in an image list and set the listview's image list property to that. (there are separate ones for small icons, large icons etc.)
{FPP}
Feb 13th, 2006, 09:37 PM
Doesnt that make each items have that pic?
MrPolite
Feb 13th, 2006, 10:08 PM
well no
each listItem has a ImageIndex property. Set it to -1 to have no image associated with it, or set it to the index of the image in the corresponding imagelist
sorry I'm tired.. and vague :( maybe shouldnt have replied to start with :sick: :D
{FPP}
Feb 14th, 2006, 04:11 PM
Ok, I cant get it, Example code?
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.