Hello ,
hello I need to set a different PNG image (with transparency ) from file for every item I add in a listview
I tried to add the items as follows
listViewUsers.Items.Add();
but it provides imageindex rather than Icon or Image as param... ()
Since, I have my image for each item on disk.. so I was hoping to add the items in the list by creating listviewitem and then adding image to it and then adding this to listview..
ListViewItem lvItem = new ListViewItem()
// set lvitem's name etc
//load my image from file
myImage = new Bitmap(@"image path here");
// but ImageList is null at this point ??? I dont understand whats going on..
lvItem.ImageList.Images.Add(myImage);
this.listViewUsers.Items.Add(lvItem);
Please help, this might be a very basic thing but I havent worked on C# before
thanks,
Ahmed