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

TCustomTreeView.Items

The container with the TTreeNode instances used in the control.

Declaration

Source position: comctrls.pp line 3710

public property TCustomTreeView.Items : TTreeNodes
  read FTreeNodes
  write SetTreeNodes;

Description

Items is a TTreeNodes property with the container used to access and maintain the hierarchical list of TTreeNode instances displayed in 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

Methods in Items can be used to access and maintain the tree nodes and their hierarchy, including:

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

See also

TTreeNodes

  

Implements a container for TTreeNode instances.

TTreeNode

  

Contains data for an item displayed in a TTreeView control.