TreeView Nodes: Easy question I think, 
Author Message
 TreeView Nodes: Easy question I think,

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



Fri, 08 Mar 2002 03:00:00 GMT  
 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



Fri, 08 Mar 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Easy question (I think)

2. Easy Question (I think)

3. Easy Question (I think)

4. Easy Question...........I Think

5. easy question (i think)

6. Easy question...(I think)

7. Easy ADO Question (I Think)

8. Easy question..I think

9. treeview node count not incrementing when adding new nodes

10. treeview - Move node, insert node

11. TreeView-Move Node Between Other Nodes?

12. Treeview Node 'Rename' mode Question

 

 
Powered by phpBB® Forum Software