|
-
July 22nd, 2002, 01:32 PM
#1
-
July 22nd, 2002, 02:26 PM
#2
The TreeView control doesnt quite work that way. If you want a node to be a child of another, you have to explicitly add it as such. You don't mess around with numerical indices.
Code:
// Get currently selected node and make a new name for child.
TreeNode ThisNode = LeftTreeView.SelectedNode;
String str2 = ThisNode.Text + "_child";
// Create a new node.
TreeNode NewNode = new TreeNode(str2);
ThisNode.Nodes.Add( NewNode );
-
July 22nd, 2002, 02:31 PM
#3
"Judge a man by his questions rather than his answers." - Voltaire
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|