How to: Add Nodes to a TreeView Control
This example adds three first-level nodes to an existing TreeView control.
Example
treeView1.Nodes.Add("First Node");
treeView1.Nodes.Add("Second Node");
treeView1.Nodes.Add("Third Node");
Compiling the Code
This example requires:
- A TreeView control named treeView1.
See Also
Concepts
Designing a User Interface in Visual C#