FMX.TreeView.TCustomTreeView.Items
Delphi
property Items[Index: Integer]: TTreeViewItem read GetTreeItem;
C++
__property TTreeViewItem* Items[int Index] = {read=GetTreeItem};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | FMX.TreeView.pas FMX.TreeView.hpp |
FMX.TreeView | TCustomTreeView |
Description
Lists the individual nodes that appear in the tree view control.
Individual nodes in a tree view are TTreeViewItem objects. These individual nodes can be accessed by using the Items property along with the item's index into the tree view. For example, to access the second item in the tree view, you could use the following code.
MyTreeNode := TreeView1.Items[1];
MyTreeNode = TreeView1->Items[1];
When setting this property at design time in the Object Inspector, the tree view Items Editor appears. Use the Add Item and Add Child Item buttons to add items to the tree view.
Note: Accessing tree view items by index can be time-intensive, particularly when the tree view contains many items. For optimal performance, try to design your application so that it has as few dependencies on the tree view's item index as possible.