RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomOutline.LoadFromFile Method (string)

Loads the outline from a text image stored in a file.

Pascal
procedure LoadFromFile(const FileName: string); overload;
procedure LoadFromFile(const FileName: string; Encoding: TEncoding); overload;
C++
__fastcall LoadFromFile(const AnsiString FileName);
__fastcall LoadFromFile(const AnsiString FileName, TEncoding Encoding);

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!