TTreeNodes.FindNodeWithText function
Finds a tree node containing the specified text.
Declaration
function FindNodeWithText(const NodeText: string): TTreeNodeArguments
NodeText | Text value to locate in the list of tree nodes. |
Function result
Tree node with the text value specified in NodeText, or Nil when a matching node is not found.
Description
FindNodeWithText is a
TTreeNode function used to get
the node in the list of tree nodes where the Text for the node matches the
specified value.
NodeText is the text to locate in the TTreeNode instances.
FindNodeWithText starts the node search beginning with the top-level tree nodes. It visits the TTreeNode instances in the node list until a node with Text that matches the value in the NodeText argument is found.
FindNodeWithText uses the find options assigned to the tree view control to control the actions performed in the search. If the node options include foFindIgnoresCase, a case-insensitive comparison is used to compare the text in each node text to the value in the NodeText argument.
The return value is the TTreeNode instance with text that matches the specified value. It is set to Nil if a node is not found with the specified text value.
Use FindNodeWithTextPath to get a node with a given text path.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
