Vcl.ComCtrls.TCustomTreeView.SaveToFile
Delphi
procedure SaveToFile(const FileName: string); overload;
procedure SaveToFile(const FileName: string; AEncoding: TEncoding); overload;
C++
void __fastcall SaveToFile(const System::UnicodeString FileName)/* overload */;
void __fastcall SaveToFile(const System::UnicodeString FileName, System::Sysutils::TEncoding* AEncoding)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | Vcl.ComCtrls.pas Vcl.ComCtrls.hpp |
Vcl.ComCtrls | TCustomTreeView |
Description
Saves a tree view to the file specified in FileName.
Use the SaveToFile method to store tree view data to a text file. The nodes can later be reloaded from the file into a new tree view object, using the LoadFromFile method.
Tree view files are text files that list the Text property of each node in a tree view, one node per line. Each node text value is preceded by spaces to indicate the depth of nesting.
As an optional parameter, you can specify TEncoding, which defines the encoding of the resulting file. If no encoding is specified, the default system encoding is used.
Note: Tree view files contain only the text of the tree view nodes. They do not contain any data associated with the nodes.