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

TCustomTreeView.SaveToFile

Saves the tree nodes in Items to the specified file.

Declaration

Source position: comctrls.pp line 3709

public procedure TCustomTreeView.SaveToFile(

  const FileName: string

);

Arguments

FileName

  

File name where the tree node data is stored.

Description

SaveToFile is a method used to save the tree nodes in Items to the specified file name. FileName is a qualified path to the file on the local file system where the tree node data is stored. If FileName already exists, it is recreated and previous values in the file are lost.

SaveToFile visits each of the TTreeNode instances in Items and writes a textual representation for the tree nodes to the file. Each tree node is represented by leading Tab (#9) characters to denote the Level for the tree node, followed by the Text for the node and an end-of-line sequence (#13#10).

Use LoadFromFile to load and recreate the tree nodes for the control from the file created in the method.

Use SaveToStream and LoadFromStream to read or write tree node information using stream-based storage.

See also

TCustomTreeView.Items

  

The container with the TTreeNode instances for the control.

TCustomTreeView.SaveToStream

  

Saves the tree nodes in Items to the specified stream.

TCustomTreeView.LoadFromStream

  

Loads tree nodes from the specified stream.

TCustomTreeView.LoadFromFile

  

Loads tree nodes from the specified file.

TTreeNode.Level

  

The number of ancestor nodes for the current tree node.

TTreeNode.Text

  

Text displayed for the tree node.

TTreeNodes

  

Implements a container for TTreeNode instances.


Version 3.2 Generated 2024-02-25 Home