Sign in Join
FPDoc Onlineexperiment

TTreeView.Items property

Member of TTreeViewpublishedIn unit ComCtrls

The container with the TTreeNode instances for the control.

Declaration

pascal
property Items:;

Description

Items is a TTreeNodes property with the container used to access and maintain the hierarchical list of TTreeNode instances displayed on the tree view control.

Items allows indexed access to the TTreeNode instances in the container by their ordinal position.

// the following are equivalent
AText := ATreeView.Items[0].Text;  // caption for the first tree node
AText := ATreeView.Items.Item[0].Text;  // caption for the first tree node

The nodes in Items can be added at design-time using the Object Inspector, or at run-time. Methods in Items can be used to access and maintain the tree nodes and their hierarchy, including:

  • Add
  • AddChild
  • AddFirst
  • Clear
  • Delete
  • Insert

See TTreeNodes for more information about the properties and methods in the container class.

Use the Select, ClearSelect and ClearSelection methods to maintain the selected node(s) on the tree view control. Use MultiSelect to enable or disable multiple tree node selection on the control.

Use Selected, Selections, and SelectionCount to access single- or multi-selected nodes on the tree view control.

This description is the one of ComCtrls.TCustomTreeView.Items.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.