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

TTreeNode.IndexOfText

Returns the ordinal position for the last child node containing the specified Text.

Declaration

Source position: comctrls.pp line 3131

public function TTreeNode.IndexOfText(

  const NodeText: string

):Integer;

Function result

Ordinal position for the last child node containing the specified node Text, or -1 when not found in the child nodes.

Description

IndexOfText searches the child nodes in Items to locate a node with the text specified in the NodeText argument. A case-sensitive comparison is performed using the equality operator (=). The child nodes are searched in reverse order, and the return value represent the last node in Items with the specified value. The return value is -1 if a node is not found in Items with the specified value.

IndexOfText is a convenience method; it is not used in the implementation of TTreeNode, TTreeNodes, or TCustomTreeView.

See also

TTreeNode.Text

  

Text displayed for the tree node.


Version 4.0 Generated 2025-05-03 Home