I have a treeview control that I am adding a tree node collection to. (Basically I am displaying a drive and folder list in my application similar to Windows Explorer). Once I have created my node collection, I add it to the treeview control and I do a "myTreeView.Nodes[0].ExpandAll();" to expand the first node in the tree.
My problem is that none of the child nodes displays a plus or minus symbol until after the user clicks on a specific node, then it appears. How can I get the symbols to display when the first node is expanded?
I have tried the "myTreeView.ShowPlusMinus = true;" but that did not work. I also tried collapsing and expanding through the code but that did not work. I would like to have all nodes always show their plusMinus symbol.
Loading
jebasinghPosted Jun 28, 2007, 2:09 AM
Hi,
if a node does not contain child nodes then the plus sign and minus sign buttin will not be displayed next to the node.. In case of a node contains child nodes then obiviously the plus sign and minus sign button will be displayed next to the node..
if you set the ShowPlusMinus property to false ,even a node contains child node the plus sign and minus sign buttons would not be displayed.
if you want to display the plus sign and minus sign button for a node which does not contain the child node then you should play with the imageindex property of a node as well as imagelist control.
best of luck....