Sign in Join
FPDoc Onlineexperiment

TCustomTreeView.SaveToStream procedure

Member of TCustomTreeViewpublicIn unit ComCtrls

Saves the tree nodes in Items to the specified stream.

Declaration

pascal
procedure SaveToStream(Stream: TStream)

Arguments

Stream

TStream instance where the tree node data is stored.

Description

SaveToStream is a method used to store a textual representation for the tree nodes in Items to the specified Stream. Stream is the TStream instance where the tree node data is stored.

SaveToStream visits each of the TTreeNode instances in Items and writes the tree node information to the stream. Each node is represented 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).

SaveToStream does not change the position in Stream prior to writing node values. It assumes the stream position has been set in the calling routine. It does not reset the stream position when the method has been completed.

Use LoadFromStream to load and create tree nodes in Items from stream-based storage.

Use LoadFromFile and SaveToFile to read and write the node hierarchy using file-based storage.

See also

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