I have a listview that has colored icons at the head of each row... based on application status I need to be able to change these images to different colors to a particular index on the listview. I have an image of each color in the ImageList
I have 4 icons in an imagelist... I was wondering how to reference each item and apply a new image to the listview for a particular index of listview item... This needs to happen dynamically... something like listviewitem.icon = imagelist[0] or omething like that.
The Item was created like....
ListViewItem
item = new ListViewItem ( sName, 0 );
item.SubItems.Add (
"Manual" );
item.SubItems.Add (
"Manual" );
item.SubItems.Add (
"Waiting..." );
item.SubItems.Add (
"Waiting..." );
item.SubItems.Add (
" " );
item.SubItems.Add ( sURL );
item.SubItems.Add ( sTargetDirectory + sTargetFile );
listViewStatus.Items.Add ( item );
I'm thinkingthat sName, 0 is the item name in the column and 0 references the item int he imagelist. I need to be able to dynamically set this particular time with the samename, just a different image in the image list depending on what's going on in the app.
Thanks,
D