Vcl.Outline.TCustomOutline.LoadFromFile
Delphi
procedure LoadFromFile(const FileName: string); overload;
procedure LoadFromFile(const FileName: string; Encoding: TEncoding); overload;
C++
void __fastcall LoadFromFile(const System::UnicodeString FileName)/* overload */;
void __fastcall LoadFromFile(const System::UnicodeString FileName, System::Sysutils::TEncoding* Encoding)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | Vcl.Outline.pas Vcl.Outline.hpp |
Vcl.Outline | TCustomOutline |
Description
Loads the outline from a text image stored in a file.
Call LoadFromFile to fill an outline from the file specified by the FileName parameter. Each line in the file represents a node in the outline. The file does not include the root node.
Leading tabs and spaces are converted into levels of the outline. Text without any leading tabs or spaces becomes level 1 items. For example, the following set of strings represents an outline with three first level children descended from the root, and an additional, second level child on the first and third nodes:
ChildA ChildA1 ChildB ChildC ChildC1
To fill the outline from a text image read from a stream, use the LoadFromStream method. To fill the outline from a text image represented as a TStrings object, use the Lines property.
See Also
Code Examples