Icons and Listviews

  • Thread starter Thread starter Chris Willis
  • Start date Start date
C

Chris Willis

I've got a series of items in a listview that contain icons in the first
column. These icons are basically squares of specific colors (i.e. red,
yellow, dark gray). When one of the items is selected and subsequently
highlighted, the selected color is also applied to the icon, changing it to
dark gray. I was wondering it it were possible to allow the user to select
and highlight an item, while maintaining teh color of the icon. Or, in
other words, disable selection and highlighting on the first column. Hacks
and inelegant workarounds will also be accepted!

Thanks,
Chris
 
Try using ListView.StateImageList and ListViewItem.StateImageIndex,
instead of ListView.ImageList and ListView.ImageIndex. State images
don't get their colors blended when the item is selected.
 
Back
Top