System.Windows.Forms.TreeNode.BeginEdit Method

Initiates the editing of the tree node label.

Syntax

public void BeginEdit ()

Remarks

A typical scenario to use this method is to call it on the MenuItem.Click event of a System.Windows.Forms.MenuItem or System.Windows.Forms.ContextMenu.

Note:

This method only works if the TreeView.LabelEdit property of the System.Windows.Forms.TreeView is set to true. If TreeView.LabelEdit is set to false, an exception is thrown and the tree node will not be put into an editable state.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0