On a form there is a treeview, filled up with some hierarchical data. Treeview is linked to an imagelist. Pretty simple, isn’t it?
There is a such moment – after a specific action (ex. status change) – for a specific node I need to clear it’s image – only text.
I try code this next way:
treeView1.SelectedNode.SelectedImageIndex = -1;
treeView1.SelectedNode.ImageIndex = -1;
but not work – image persists.
Is any way to do this?
Ok, I found solution myself.
Firstly – response to my question is no, but there is a trick – on form load I’m adding dynamically a transparent image:
and after that when I need to “clear” the image of a node – I have only to set this image to that node.