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

TTreeNode.Enabled

Controls whether the tree node can be selected, and its visual appearance.

Declaration

Source position: comctrls.pp line 3178

public property TTreeNode.Enabled : Boolean
  read GetEnabled
  write SetEnabled
  default True;

Description

Enabled is a Boolean property which indicates if the tree node can be selected in a tree control. The Selected and MultiSelected properties cannot be set to True when Enabled is False. A mouse click used to select the node is also ignored when Enabled is False. The default value for the property is True.

Read and write access to the property value are redirected to the States property. Enabled is True when nsEnabled is included in the States property. It is False if the value is omitted from States.

Changing the property value causes States to be updated to include or exclude nsEnabled as needed. Selected is set to False for any change to the property value, and the Update method is called to redrawn the Node on the tree view control. The Changed method is called to notify the tree view control of the reason for the update (ncEnablement).

Enabled also affects the visual display for the tree node. When set to False, the text for the node is drawn using either the DisabledFontColor (when assigned) or theme element details for the tree view control.

Remark: A tree node can still be expanded (if it has child nodes) even when Enabled is False.

See also

TTreeNode.Selected

  

True if the current node is selected in the tree view control.

TTreeNode.MultiSelected

  

Indicates whether the node is one of several nodes selected simultaneously (e.g. using the Shift or Ctrl key while selecting on a tree view control).

TTreeNode.Expanded

  

True if the node has been expanded, False when collapsed.

TTreeNode.States

  

Contains active state flags for the tree node.

TTreeNode.Update

  

Redraws the associated TreeView control if an update is not already in progress.

TTreeNode.Changed

  

Performs a change notification for the node with the specified reason.

TTreeNode.TreeView

  

The tree view control where the node is displayed.

TCustomTreeView.Selected

  

The selected tree node in the control.

TCustomTreeView.MouseDown

  

Handles mouse down events for the tree view control.

TCustomTreeView.DoPaintNode

  

Renders the specified tree node to the canvas for the control.

TCustomTreeView.Options

  

The set of options enabled in the tree view control.

TCustomTreeView.DisabledFontColor

  

Font color used for a tree node when the tree view or the node is not enabled.


Version 4.0 Generated 2025-05-03 Home