I was wondering whether it would be possible to have a ListView, in which items can be selected as usual with one difference. When a ListViewItem is selected, I would like to see the selection in the text label, however I would prefer the image to remain the same. The reason for this is, that currently the blue selection drawn ontop of the image looks horrible (the effect is even worse on transparent images!).
I was hoping of not having to use the DrawItem handler, but I guess the hopes are slim.
thanks a lot,
best
Frank
EDIT: I thought I better add a screenshot showing the issue. I’m using the ListView in LargeIcon mode.
** oups I’m not allowed to add pictures yet * so here the link to it. sorry for the inconvenience. ***
http://cl.ly/adb9c6d29ffc0e2e1b5e
As you can see the selected element is ‘Rate vs. Species’. However, I would love for the blue tint on the icon to disappear.
Thanks again.
For a winforms ListView, the easiest way I’m aware of to do this would be to inherit from ListView, and override OnDrawSubitem to only change the drawing of your image. If you do this, you’ll need to set OwnerDraw to true, and override OnDrawColumnHeader as well.
Note that if you don’t want to inherit, you can handle DrawSubItem and DrawColumnHeader instead.