System.Windows.Forms.TreeView Members

The members of System.Windows.Forms.TreeView are listed below.

See Also: Inherited members from System.Windows.Forms.Control

Public Constructors

Initializes a new instance of the System.Windows.Forms.TreeView class.

Public Properties

override
BackColorSystem.Drawing.Color. Documentation for this section has not yet been entered.
override
BackgroundImageSystem.Drawing.Image.

Gets or set the background image for the System.Windows.Forms.TreeView control.

override
BackgroundImageLayoutImageLayout.

Gets or sets the layout of the background image for the System.Windows.Forms.TreeView control.

BorderStyleBorderStyle.

Gets or sets the border style of the tree view control.

CheckBoxesbool.

Gets or sets a value indicating whether check boxes are displayed next to the tree nodes in the tree view control.

DrawModeTreeViewDrawMode.

Gets or sets the mode in which the control is drawn.

override
ForeColorSystem.Drawing.Color.

The current foreground color for this control, which is the color the control uses to draw its text.

FullRowSelectbool.

Gets or sets a value indicating whether the selection highlight spans the width of the tree view control.

HideSelectionbool.

Gets or sets a value indicating whether the selected tree node remains highlighted even when the tree view has lost the focus.

HotTrackingbool.

Gets or sets a value indicating whether a tree node label takes on the appearance of a hyperlink as the mouse pointer passes over it.

ImageIndexint.

Gets or sets the image-list index value of the default image that is displayed by the tree nodes.

ImageKeystring.

Gets or sets the key of the default image for each node in the System.Windows.Forms.TreeView control when it is in an unselected state.

ImageListImageList.

Gets or sets the System.Windows.Forms.ImageList that contains the System.Drawing.Image objects that are used by the tree nodes.

Indentint.

Gets or sets the distance to indent each child tree node level.

ItemHeightint.

Gets or sets the height of each tree node in the tree view control.

LabelEditbool.

Gets or sets a value indicating whether the label text of the tree nodes can be edited.

LineColorSystem.Drawing.Color.

Gets or sets the color of the lines connecting the nodes of the System.Windows.Forms.TreeView control.

[read-only]
NodesTreeNodeCollection.

Gets the collection of tree nodes that are assigned to the tree view control.

PaddingPadding.

Gets or sets the spacing between the System.Windows.Forms.TreeView control's contents and its edges.

PathSeparatorstring.

Gets or sets the delimiter string that the tree node path uses.

RightToLeftLayoutbool.

Gets or sets a value that indicates whether the System.Windows.Forms.TreeView should be laid out from right-to-left.

Scrollablebool.

Gets or sets a value indicating whether the tree view control displays scroll bars when they are needed.

SelectedImageIndexint.

Gets or sets the image list index value of the image that is displayed when a tree node is selected.

SelectedImageKeystring.

Gets or sets the key of the default image shown when a System.Windows.Forms.TreeNode is in a selected state.

SelectedNodeTreeNode.

Gets or sets the tree node that is currently selected in the tree view control.

ShowLinesbool.

Gets or sets a value indicating whether lines are drawn between tree nodes in the tree view control.

ShowNodeToolTipsbool.

Gets or sets a value indicating ToolTips are shown when the mouse pointer hovers over a System.Windows.Forms.TreeNode.

ShowPlusMinusbool.

Gets or sets a value indicating whether plus-sign (+) and minus-sign (-) buttons are displayed next to tree nodes that contain child tree nodes.

ShowRootLinesbool.

Gets or sets a value indicating whether lines are drawn between the tree nodes that are at the root of the tree view.

Sortedbool.

Gets or sets a value indicating whether the tree nodes in the tree view are sorted.

StateImageListImageList.

Gets or sets the image list that is used to indicate the state of the System.Windows.Forms.TreeView and its nodes.

override
Textstring.

Gets or sets the text of the System.Windows.Forms.TreeView.

TopNodeTreeNode.

Gets or sets the first fully-visible tree node in the tree view control.

TreeViewNodeSorterIComparer.

Gets or sets the implementation of IComparer to perform a custom sort of the System.Windows.Forms.TreeView nodes.

[read-only]
VisibleCountint.

Gets the number of tree nodes that can be fully visible in the tree view control.

Protected Properties

[read-only]
override
CreateParamsCreateParams.

Overrides Control.CreateParams.

[read-only]
override
DefaultSizeSystem.Drawing.Size. Documentation for this section has not yet been entered.
override
DoubleBufferedbool.

Gets or sets a value indicating whether the control should redraw its surface using a secondary buffer. The TreeView.DoubleBuffered property does not affect the System.Windows.Forms.TreeView control.

Public Methods

BeginUpdate()

Disables any redrawing of the tree view.

CollapseAll()

Collapses all the tree nodes.

EndUpdate()

Enables the redrawing of the tree view.

ExpandAll()

Expands all the tree nodes.

GetNodeAt(System.Drawing.Point) : TreeNode

Retrieves the tree node that is at the specified point.

GetNodeAt(int, int) : TreeNode

Retrieves the tree node at the point with the specified coordinates.

GetNodeCount(bool) : int

Retrieves the number of tree nodes, optionally including those in all subtrees, assigned to the tree view control.

HitTest(System.Drawing.Point) : TreeViewHitTestInfo

Provides node information, given a point.

HitTest(int, int) : TreeViewHitTestInfo

Provides node information, given x- and y-coordinates.

Sort()

Sorts the items in System.Windows.Forms.TreeView control.

override
ToString() : string

Overrides System.ComponentModel.Component.ToString.

Protected Methods

override
CreateHandle()
Documentation for this section has not yet been entered.
override
Dispose(bool)

Releases the unmanaged resources used by the System.Windows.Forms.TreeView and optionally releases the managed resources.

GetItemRenderStyles(TreeNode, int) : OwnerDrawPropertyBag

Returns an System.Windows.Forms.OwnerDrawPropertyBag for the specified System.Windows.Forms.TreeNode.

override
IsInputKey(Keys) : bool

Determines whether the specified key is a regular input key or a special key that requires preprocessing.

OnAfterCheck(TreeViewEventArgs)

Raises the TreeView.AfterCheck event.

OnAfterCollapse(TreeViewEventArgs)

Raises the TreeView.AfterCollapse event.

OnAfterExpand(TreeViewEventArgs)

Raises the TreeView.AfterExpand event.

OnAfterLabelEdit(NodeLabelEditEventArgs)

Raises the TreeView.AfterLabelEdit event.

OnAfterSelect(TreeViewEventArgs)

Raises the TreeView.AfterSelect event.

OnBeforeCheck(TreeViewCancelEventArgs)

Raises the TreeView.BeforeCheck event.

OnBeforeCollapse(TreeViewCancelEventArgs)

Raises the TreeView.BeforeCollapse event.

OnBeforeExpand(TreeViewCancelEventArgs)

Raises the TreeView.BeforeExpand event.

OnBeforeLabelEdit(NodeLabelEditEventArgs)

Raises the TreeView.BeforeLabelEdit event.

OnBeforeSelect(TreeViewCancelEventArgs)

Raises the TreeView.BeforeSelect event.

OnDrawNode(DrawTreeNodeEventArgs)

Raises the TreeView.DrawNode event.

override
OnHandleCreated(EventArgs)

Overrides Control.OnHandleCreated(EventArgs).

override
OnHandleDestroyed(EventArgs)

Overrides Control.OnHandleDestroyed(EventArgs).

OnItemDrag(ItemDragEventArgs)

Raises the TreeView.ItemDrag event.

override
OnKeyDown(KeyEventArgs)

Raises the Control.KeyDown event.

override
OnKeyPress(KeyPressEventArgs)

Raises the Control.KeyPress event.

override
OnKeyUp(KeyEventArgs)

Overrides Control.OnKeyUp(KeyEventArgs).

override
OnMouseHover(EventArgs)

Raises the Control.MouseHover event.

override
OnMouseLeave(EventArgs)

Raises the Control.MouseLeave event.

OnNodeMouseClick(TreeNodeMouseClickEventArgs)

Raises the TreeView.NodeMouseClick event.

OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs)

Raises the TreeView.NodeMouseDoubleClick event.

OnNodeMouseHover(TreeNodeMouseHoverEventArgs)

Raises the TreeView.NodeMouseHover event.

OnRightToLeftLayoutChanged(EventArgs)

Raises the TreeView.RightToLeftLayoutChanged event.

override
WndProc(ref Message)
Documentation for this section has not yet been entered.

Public Events

AfterCheck

Occurs after the tree node check box is checked.

AfterCollapse

Occurs after the tree node is collapsed.

AfterExpand

Occurs after the tree node is expanded.

AfterLabelEdit

Occurs after the tree node label text is edited.

AfterSelect

Occurs after the tree node is selected.

BackgroundImageChanged

Occurs when the TreeView.BackgroundImage property changes.

BackgroundImageLayoutChanged

Occurs when the TreeView.BackgroundImageLayout property changes.

BeforeCheck

Occurs before the tree node check box is checked.

BeforeCollapse

Occurs before the tree node is collapsed.

BeforeExpand

Occurs before the tree node is expanded.

BeforeLabelEdit

Occurs before the tree node label text is edited.

BeforeSelect

Occurs before the tree node is selected.

DrawNode

Occurs when a System.Windows.Forms.TreeView is drawn and the TreeView.DrawMode property is set to a System.Windows.Forms.TreeViewDrawMode value other than TreeViewDrawMode.Normal.

ItemDrag

Occurs when the user begins dragging a node.

NodeMouseClick

Occurs when the user clicks a System.Windows.Forms.TreeNode with the mouse.

NodeMouseDoubleClick

Occurs when the user double-clicks a System.Windows.Forms.TreeNode with the mouse.

NodeMouseHover

Occurs when the mouse hovers over a System.Windows.Forms.TreeNode.

PaddingChanged

Occurs when the value of the TreeView.Padding property changes.

Paint

Occurs when the System.Windows.Forms.TreeView is drawn.

RightToLeftLayoutChanged

Occurs when the value of the TreeView.RightToLeftLayout property changes.

TextChanged

Occurs when the TreeView.Text property changes.