[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ComCtrls' (#lcl)

# TCustomTreeView.BeginEditing

Prepares the control to edit the text for the specified tree node.

## Declaration

Source position: comctrls.pp line 3563

`protected procedure TCustomTreeView.BeginEditing(`
`ANode: TTreeNode`
`); virtual;`

## Arguments

`ANode` |  | Tree node with the text value for the Editor in the control.

## Description

No actions are performed in the method for any of the following conditions:

- ANode has not been assigned (contains Nil).
- ANode is not visible.
- BeginEditing has been called and EndEditing has not yet been called.
- CanEdit (and the OnEditing event handler) returns False.

If a different node is being edited in the control, the EndEditing method is called.

BeginEditing updates the States property to include the value tvsIsEditing.

The TEdit control used as the Editor in the tree view is created (when needed), configured, and aligned to the display rectangle for the tree node. The value in the TTreeNode.Text property is assigned to the Editor, its content is selected, and the Editor is given focus.

## See also

TCustomTreeView.States |  | Contains the state values in effect for the control.
TCustomTreeView.EndEditing |  | Updates the specified tree node and hides editor.
TTreeNode.Text |  | Text displayed for the tree node.