Sign in Join
FPDoc Onlineexperiment

TTreeNode.GetTextPath function

Member of TTreeNodepublicIn unit ComCtrls

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

Declaration

pascal
function 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.

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

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.