Adding a Node to TreeView

Adding a Node to TreeView thumbnail
Visual Studio is used to create web, desktop and database applications.

The TreeView control in Microsoft's Visual Studio programs is used to show the hierarchy of nodes that you specify while creating your applications. You can think of a TreeView control as showing the expanded list of all of the files on your computer in the Windows Explorer. The TreeView control has many different options and settings so that you can customize its appearance to fit your preference. The most basic thing you can do with a TreeView control is to add nodes to it.

Instructions

    • 1

      Open the file you want to work with in the Microsoft Visual Studio application. TreeViews work in Visual Basic or Visual C#. You can open either one of these programs from inside of the Visual Studio suite, or from the "Start" menu if you have the standalone application instead of the suite.

    • 2

      Click on the TreeView control that you want to add a node to in order to select it.

    • 3

      Click the ellipsis (...) button next to "Nodes" in the Properties window on the left or right side pane. The properties automatically show for the TreeView when you select it. The TreeNode Editor opens.

    • 4

      Click the "Add Root" button to add a root node, if it doesn't exists already. You can't add child nodes unless there is a root node. Click on the "Add Child" to add child nodes. Close the TreeNode Editor once you are done adding all of the nodes.

Related Searches:

References

  • Photo Credit Comstock/Comstock/Getty Images

Comments

Related Ads

Featured