Sign in Join
FPDoc Onlineexperiment

TCustomTreeView.LoadFromFile procedure

Member of TCustomTreeViewpublicIn unit ComCtrls

Loads tree nodes from the specified file.

Declaration

pascal
procedure LoadFromFile(const FileName: string)

Description

LoadFromFile is a method used to load the tree nodes from the specified file name into the Items property. FileName is a qualified file name which contains the textual representation for the tree node hierarchy generated using SaveToFile.

Each tree node in FileName is represented using leading Tab (#9) characters for the Level in the tree node, followed by the Text for the node and an end-of-line sequence (#13#10). TTreeNode instances are created and added to the Items property when the node values are read from the file.

Use SaveToFile to store the textual representation for tree nodes in Items to a given file name.

Use SaveToStream and LoadFromStream to read and write the node hierarchy using stream-based storage.

See also

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.