byoung Posted January 28, 2003 Posted January 28, 2003 After I add a Node, whether it is SelectedNode or not, I want to mark that node so I can add children to it. tvwDemo.SelectedNodes.Nodes.Add("Item To Add") Once I have done this, how do I get the index or position the node to add a new node to "Item To Add"? tvwDemo.Nodes("Item To Add").Add("Sub 1") What is the best way to position adding to the last node in a TreeNode? Thanks! Barry Quote
*Gurus* divil Posted January 28, 2003 *Gurus* Posted January 28, 2003 The best way to add treenodes is to create the TreeNode object first, then add it to the treeview: Dim t As New TreeNode("text") TreeView1.Nodes.Add(t) You can then find out the index of the treenode with the Index property of t. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.