how do i use the treeview please help
Printable View
how do i use the treeview please help
To use the MS Tree View control you must setup the nodes (branches) at run time (in code). You cannot setup the nodes at design time.
1) To setup the root node:
Set NewNode = msTreeView.Nodes.Add(, , strNodeKey, strNodeText)
where strNodeKey is a unique string to identify the node and strNodeText is the displayed text.
2) To add children (branches):
Set NewNode = msTreeView.Nodes.Add(ParnentNode,tvwChild, strChildNodeKey, strChildNodeText)
Is this enough information?
Simon.
Is there a way to do it not threw a code but in the
visual setup?
I don't think there is anyway to do that at design time (the visual setup) unless anybody else knows how?
No, sorry. No way to do this yet. Add it to the Wish List for vb7. Personally I think it wouldn't be too hard, and I considered doing a custom control to emulate that feature, but heck. They added coolbars to VB6, so why not editable trees to VB7?!?!?