treeview parent or child ? 
Author Message
 treeview parent or child ?

I am sure this is a simple question, I just cant seem to get it to work.

I am looping through the nodes on a treeview using treeview.nodes.count. I
want to see if a node is either / or a parent or a child. I keep getting
object errors.

At present, as I am adding the nodes, I place something in the tag property,
which works, But I am sure there is a correct way of doing this.

Can you help ?



Sun, 09 Jun 2002 03:00:00 GMT  
 treeview parent or child ?

Quote:
> I am looping through the nodes on a treeview using treeview.nodes.count. I
> want to see if a node is either / or a parent or a child. I keep getting
> object errors.

A Node has a Parent property, that is Nothing, if the Node is a root node.
A Node has a Children property that counts the child nodes.
A Node has a Child property that references the first child Node.

Regards,

Harald M. Genauck

ABOUT Visual Basic - das Webmagazin
http://www.aboutvb.de



Sun, 09 Jun 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. TreeView : child with multiple parents

2. Select parent or children in treeview

3. TreeView Parent/Child Expanded Question

4. Move Treeview Child Node To Different Parent

5. Get TreeView MouseUp event to recognize parent/child

6. TreeView Drag n Drop don't allow dropping a parent into a child

7. ReOrdering Child nodes Within Parent in treeview

8. Treeview/listview to display Parent-child recordsets

9. Move activex dll child on a MDI parent parent window

10. MSHFlexGrid format child side in parent child form

11. howto: Parent of Parent of Parent ....

12. Appending Parent and Child data

 

 
Powered by phpBB® Forum Software