Reputation: 3358
I have a TreeView
with a ImageList
populated in run time. This TreeView
has only a root node and everything else is a direct child of that root node.
1) My root node have a image, and I don't want.
//I tried to put -1, because this property has a default 0 (non-nullable int)
this.Nodes[0].ImageIndex = -1;
//But nothing happened.
2) The selected node always change the image to the index 0, it shouldn't
//Again, changing to -1 did nothing.
this.SelectedImageIndex = -1;
Example:
Upvotes: 2
Views: 1568
Reputation: 2613
Get a blank .ico file (You can use this one :http://knowledgebase.twocoders.de/wp-content/uploads/2010/10/blank.ico) and add it to your image list. Set the image to the index of the blank.ico. The end result should will be a list view node without an icon. Here is an example of what it looks like:
Upvotes: 1