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

# TCustomTreeView.OnEditing

Event handler signalled to determine whether the editor can be enabled for a tree node.

## Declaration

Source position: comctrls.pp line 3680

`protected property TCustomTreeView.OnEditing : TTVEditingEvent read FOnEditing write FOnEditing;`

## Description

OnEditing is a TTVEditingEvent property with the event handler signalled to determine whether an editor can be enabled for a node on the tree view control. OnEditing is signalled (when assigned) from the CanEdit method, and occurs when the BeginEditing method is called. This can be in response to a key down event handled for the tree view control, or when the EditText method is called for a TTreeNode instance in Items.

Arguments to the event handler include:

Sender
  The object instance (TCustomTreeView) for the event.
Node
  The TTreeNode instance to be edited on the control.
AllowEdit
  A Boolean variable argument which indicates whether the node editor can be enabled for the tree node. The handler routine can set AllowEdit to False to prevent the node editor from being enabled.

Use OnEdited to perform actions needed when editing has been completed for the node.

Use OnEditingEnd to perform actions needed when a tree node is disconnected from the node editor for the control.

## See also

TCustomTreeView.CanEdit |  | Returns True if the specified tree node can be edited.
TCustomTreeView.BeginEditing |  | Prepares the control to edit the text for the specified tree node.
TCustomTreeView.EndEditing |  | Updates the specified tree node and hides editor.
TCustomTreeView.OnEditingEnd |  | Event handler signalled when EndEditing is called for the control.
TCustomTreeView.KeyDown |  | Handles key down events for the control.
TCustomTreeView.Options |  | The set of options enabled in the tree view control.
TCustomTreeView.States |  | Contains the state values in effect for the control.
TTreeNode.EditText |  | Edits the text for the node in the associated TreeView control.