Updating the icons in an ObjectListView

Posted by Eric on Stack Overflow See other posts from Stack Overflow or by Eric
Published on 2010-06-09T00:15:11Z Indexed on 2010/06/09 0:22 UTC
Read the original article Hit count: 656

I'm using an TreeListView (a sub type of ObjectListView) in my current project. Each item in the list is given an icon, but the icon my vary depending on the state of the item. For example if the item is readonly I want to use an icon with a little lock symbol.

When the items are first added to the TreeListView the icons are show correctly, yet later when the state of an item changes the icons are not updating. How do I force the control to regenerate all the icons?

© Stack Overflow or respective owner

Related posts about c#

Related posts about winforms