c# - Preventing image on TreeView root node, and preventing selected node from defaulting to image 0 -
c# - Preventing image on TreeView root node, and preventing selected node from defaulting to image 0 -
i have treeview imagelist populated in run time. treeview has root node , else direct kid of root node.
1) root node have image, , don't want.
//i tried set -1, because property has default 0 (non-nullable int) this.nodes[0].imageindex = -1; //but nil happened. 2) selected node alter image index 0, shouldn't
//again, changing -1 did nothing. this.selectedimageindex = -1; example:
get blank .ico file (you can utilize 1 :http://knowledgebase.twocoders.de/wp-content/uploads/2010/10/blank.ico) , add together image list. set image index of blank.ico. end result should list view node without icon. here illustration of looks like:
c# .net-4.0 treeview
Comments
Post a Comment