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

TTreeNode.GetTextPath

Gets the hierarchical path to the tree node in the tree view.

Declaration

Source position: comctrls.pp line 3128

public function TTreeNode.GetTextPath: string;

Description

GetTextPath is a String function used to get the hierarchical path to the current node in a tree view control.

For example:

/parent1/child1

GetTextPath visits (in reverse order) each of the TTreeNode instances from the current node to the first node in the Parent hierarchy. The text path for the current is built using the PathDelimiter from the tree view control and the value in the Text property. The text path for each prior node in the hierarchy is prepended to the form the return value.

Use the FindNodeWithTextPath method in TTreeNodes to retrieve a tree node with the value returned from GetTextPath.

Version info

Modified in LCL version 3 to use the PathDelimiter in TCustomTreeView.

See also

TTreeNode.Text

  

Text displayed for the tree node.

TTreeNode.Parent

  

Parent node for the current tree node.

TTreeNodes.FindNodeWithTextPath

  

Finds a node with the hierarchical path specified in TextPath.

TTreeNodes.FindNodeWithText

  

Finds a tree node containing the specified text.

TCustomTreeView.PathDelimiter

  

Delimiter used to separate node identifiers in the path to a given tree node.


Version 4.0 Generated 2025-05-03 Home