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

Re: Icons and Listviews by Joe

Joe
Sat Aug 02 00:28:28 CDT 2003

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.


Chris Willis wrote:
> 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