System.Windows.Forms.TreeNode Members

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

See Also: Inherited members from System.MarshalByRefObject

Public Constructors

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

Initializes a new instance of the System.Windows.Forms.TreeNode class with the specified label text.

Initializes a new instance of the System.Windows.Forms.TreeNode class with the specified label text and child tree nodes.

Initializes a new instance of the System.Windows.Forms.TreeNode class with the specified label text and images to display when the tree node is in a selected and unselected state.

Initializes a new instance of the System.Windows.Forms.TreeNode class with the specified label text, child tree nodes, and images to display when the tree node is in a selected and unselected state.

Protected Constructors

Initializes a new instance of the System.Windows.Forms.TreeNode class using the specified serialization information and context.

Public Properties

BackColorSystem.Drawing.Color.

Gets or sets the background color of the tree node.

[read-only]
BoundsSystem.Drawing.Rectangle.

Gets the bounds of the tree node.

Checkedbool.

Gets or sets a value indicating whether the tree node is in a checked state.

ContextMenuContextMenu.

Gets the shortcut menu that is associated with this tree node.

ContextMenuStripContextMenuStrip.

Gets or sets the shortcut menu associated with this tree node.

[read-only]
FirstNodeTreeNode.

Gets the first child tree node in the tree node collection.

ForeColorSystem.Drawing.Color.

Gets or sets the foreground color of the tree node.

[read-only]
FullPathstring.

Gets the path from the root tree node to the current tree node.

[read-only]
HandleIntPtr.

Gets the handle of the tree node.

ImageIndexint.

Gets or sets the image list index value of the image displayed when the tree node is in the unselected state.

ImageKeystring.

Gets or sets the key for the image associated with this tree node when the node is in an unselected state.

[read-only]
Indexint.

Gets the position of the tree node in the tree node collection.

[read-only]
IsEditingbool.

Gets a value indicating whether the tree node is in an editable state.

[read-only]
IsExpandedbool.

Gets a value indicating whether the tree node is in the expanded state.

[read-only]
IsSelectedbool.

Gets a value indicating whether the tree node is in the selected state.

[read-only]
IsVisiblebool.

Gets a value indicating whether the tree node is visible or partially visible.

[read-only]
LastNodeTreeNode.

Gets the last child tree node.

[read-only]
Levelint.

Gets the zero-based depth of the tree node in the System.Windows.Forms.TreeView control.

Namestring.

Gets or sets the name of the tree node.

[read-only]
NextNodeTreeNode.

Gets the next sibling tree node.

[read-only]
NextVisibleNodeTreeNode.

Gets the next visible tree node.

NodeFontSystem.Drawing.Font.

Gets or sets the font that is used to display the text on the tree node label.

[read-only]
NodesTreeNodeCollection.

Gets the collection of System.Windows.Forms.TreeNode objects assigned to the current tree node.

[read-only]
ParentTreeNode.

Gets the parent tree node of the current tree node.

[read-only]
PrevNodeTreeNode.

Gets the previous sibling tree node.

[read-only]
PrevVisibleNodeTreeNode.

Gets the previous visible tree node.

SelectedImageIndexint.

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

SelectedImageKeystring.

Gets or sets the key of the image displayed in the tree node when it is in a selected state.

StateImageIndexint.

Gets or sets the index of the image that is used to indicate the state of the System.Windows.Forms.TreeNode when the parent System.Windows.Forms.TreeView has its TreeView.CheckBoxes property set to false.

StateImageKeystring.

Gets or sets the key of the image that is used to indicate the state of the System.Windows.Forms.TreeNode when the parent System.Windows.Forms.TreeView has its TreeView.CheckBoxes property set to false.

Tagobject.

Gets or sets the object that contains data about the tree node.

Textstring.

Gets or sets the text displayed in the label of the tree node.

ToolTipTextstring.

Gets or sets the text that appears when the mouse pointer hovers over a System.Windows.Forms.TreeNode.

[read-only]
TreeViewTreeView.

Gets the parent tree view that the tree node is assigned to.

Public Methods

BeginEdit()

Initiates the editing of the tree node label.

Clone() : object

Copies the tree node and the entire subtree rooted at this tree node.

Collapse()

Collapses the tree node.

Collapse(bool)

Collapses the System.Windows.Forms.TreeNode and optionally collapses its children.

EndEdit(bool)

Ends the editing of the tree node label.

EnsureVisible()

Ensures that the tree node is visible, expanding tree nodes and scrolling the tree view control as necessary.

Expand()

Expands the tree node.

ExpandAll()

Expands all the child tree nodes.

static
FromHandle(TreeView, IntPtr) : TreeNode

Returns the tree node with the specified handle and assigned to the specified tree view control.

GetNodeCount(bool) : int

Returns the number of child tree nodes.

Remove()

Removes the current tree node from the tree view control.

Toggle()

Toggles the tree node to either the expanded or collapsed state.

override
ToString() : string
Documentation for this section has not yet been entered.

Protected Methods

Explicitly Implemented Interface Members

System.Runtime.Serialization.ISerializable.GetObjectData

Populates a serialization information object with the data needed to serialize the System.Windows.Forms.TreeNode.