Files
docs-desktop/dotnet-desktop-guide/framework/winforms/controls/treeview-control-overview-windows-forms.md
T
Andy De George c0ba284473 Initial winforms content migrated (#18)
* Merge winforms framework content to working branch (#14)

* Breadcrumb / TOC / Move net5 to net folder (#15)

* change path from net5 to net

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Add .net 5 winforms placeholder article (#16)

* added some metadata and adjusted net5 placeholder

* corrections

* corrections

* corrections

* Test1

* Swapping landing page vs concept

* fix links

* Fix links

* Fix desc
2020-09-01 16:26:21 -07:00

2.8 KiB

title, ms.date, f1_keywords, helpviewer_keywords, ms.assetid
title ms.date f1_keywords helpviewer_keywords ms.assetid
TreeView Control Overview 03/30/2017
TreeView
TreeView control [Windows Forms], about TreeView control
0ece823a-9508-478a-bbdb-7d7c3bae51d5

TreeView Control Overview (Windows Forms)

With the Windows Forms xref:System.Windows.Forms.TreeView control, you can display a hierarchy of nodes to users, like the way files and folders are displayed in the left pane of the Windows Explorer feature of the Windows operating system. Each node in the tree view might contain other nodes, called child nodes. You can display parent nodes, or nodes that contain child nodes, as expanded or collapsed. You can also display a tree view with check boxes next to the nodes by setting the tree view's xref:System.Windows.Forms.TreeView.CheckBoxes%2A property to true. You can then programmatically select or clear nodes by setting the node's xref:System.Windows.Forms.TreeNode.Checked%2A property to true or false.

Key Properties

The key properties of the xref:System.Windows.Forms.TreeView control are xref:System.Windows.Forms.TreeView.Nodes%2A and xref:System.Windows.Forms.TreeView.SelectedNode%2A. The xref:System.Windows.Forms.TreeView.Nodes%2A property contains the list of top-level nodes in the tree view. The xref:System.Windows.Forms.TreeView.SelectedNode%2A property sets the currently selected node. You can display icons next to the nodes. The control uses images from the xref:System.Windows.Forms.ImageList named in the tree view's xref:System.Windows.Forms.TreeView.ImageList%2A property. The xref:System.Windows.Forms.TreeView.ImageIndex%2A property sets the default image for nodes in the tree view. For more information about displaying images, see How to: Set Icons for the Windows Forms TreeView Control. If you are using Visual Studio 2005, you have access to a large library of standard images that you can use with the xref:System.Windows.Forms.TreeView control.

See also