Hi Ernest,
I have been using the WinForms TreeView in several real-world projects (see
the one in my signature, for example) and it works fine. I actually haven't
used anything except the MSDN library as the documentation.
> One of my current issues is in trying to add a node. I use the ADD method
> but under the .net version, you MUST add the node under the parent which
> assumes you have a reference to the node collection:
> (i.e tvParentNode.Add ("New child Node description")
This is simple. You first instantiate the parent (that is, root node):
Dim rootNode As TreeNode = New TreeNode(...) ' Specify node text etc. in the
arguments
Then, you add childs to that parent - you already know how this is done.
And finally, you attach the root to the tree itself:
treeView.Nodes.Add(rootNode)
P.S. The biggest difference between the .NET TreeView and the VB6 one is
probably that you are not stuck to the Add method to create new nodes - you
just can instantiate them directly.
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"Ernest Cook" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Does anyone have any real world experience using the .Net version of the
> treeview control? If so, Can you recommend any good documentation sources
> for learning more about it. i.e. Methods, etc.
>
> I have a few different samples projects and am looking for many more to
help
> me understand everything I can about it.
>
> One of my current issues is in trying to add a node. I use the ADD method
> but under the .net version, you MUST add the node under the parent which
> assumes you have a reference to the node collection:
> (i.e tvParentNode.Add ("New child Node description")
>
> If I don't have reference to the parent node, how do i get it?
> tvOntheForm.Nodes() requires an integer. I know the value I put in the
> description, but the index can change ?
>
>