
TreeView Nodes: Easy question I think,
To close down all the nodes of a tree
For each node in treeview.nodes
node.expanded=false
next
You then have to set the expanded property of your root node to true - If it
was the first node you added and the tree isn't sorted you can do
treeview.nodes(1).expanded=true
Otherwise you need to find the root node....something like this should do it
for each node in treeview.nodes
if node.key="ROOT" then
node.expanded=true
exit for
end if
next
Quote:
> I have searched the vb6 help....
> How do I close all nodes (down to first child)on a form at start up?
> I created a simple node tree with a few branches and I only want
> the first level (off the root) to be open, now how do I manipulate them
> via code?
> I can do it at run time, but how to do it at desgin time?
> --
> Dwayne Miller
> ICQ: 49362615