From b5ca6b01faa377656ac1a0a9184888099d602c2f Mon Sep 17 00:00:00 2001 From: dsiders Date: Wed, 9 Nov 2022 01:31:45 +0000 Subject: [PATCH] Docs: LCL/comctrls. Updates topic content for changes in 1b3c13f9. * Updates: TTreeNodes.FindNodeWithText, TTreeNodes.FindNodeWithTextPath. --- docs/xml/lcl/comctrls.xml | 61 +++++++++++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 9 deletions(-) diff --git a/docs/xml/lcl/comctrls.xml b/docs/xml/lcl/comctrls.xml index 5a378d640d..d124803775 100644 --- a/docs/xml/lcl/comctrls.xml +++ b/docs/xml/lcl/comctrls.xml @@ -27209,14 +27209,52 @@ pointer. Finds a node containing the specified text string. - - + +

+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. +

+
+ + + + +SysUtils.SameText + - + +Tree node with the text value specified in NodeText, or Nil when a +matching node is not found. + - + +Text value to locate in the list of tree nodes. + @@ -27240,14 +27278,19 @@ the tree. A leading path delimiter in TextPath is assumed, and the following values in TextPath are considered to be equivalent:

-/parentnode -parentnode +/parentnode/childnode/grandchildnode +parentnode/childnode/grandchildnode

FindNodeWithTextPath calls the FindNode method in the current TTreeNode instance to locate the next tree node with the required identifier Text. The process is repeated until all of the identifiers have been located, or a node -is not found for one of the identifiers in TextPath. The Expanded property in the tree nodes is set to True prior to calling GetNode. +is not found for one of the identifiers in TextPath. The Expanded property in +a tree node is set to True prior to calling GetNode. +

+

+The return value is the TTreeNode instance found at the specified path, or +Nil if any one of the component value in the path is not found.

@@ -27271,7 +27314,7 @@ found. -Delimited text used to locate a tree node with the path and text. +Delimited text used to locate a tree node with the path and text values. @@ -28534,7 +28577,7 @@ Set type used to store find options enabled in the class.

-Values in the set are determined by the CaseInsensitiveFilenames +Values in the set are determined by the CaseInsensitiveFilenames compiler define. When defined, the set contains: [foFindExpands, foFindIgnoresCase]. Otherwise, it contains [foFindExpands].