|
TCustomRichView.LoadText, LoadTextW |
Top Previous Next |
|
Append the content of the text file FileName to the document. LoadText loads text from ANSI text files, LoadTextW loads text from Unicode (UTF-16) text files. function LoadText(const FileName: String; StyleNo, ParaNo: Integer; AsSingleParagraph: Boolean):Boolean;
function LoadTextW(const FileName: String; StyleNo, ParaNo: Integer; DefAsSingleParagraph: Boolean):Boolean; Despite their names, these methods do not clear the existing document before loading. To replace the current document with the content of this file, call Clear method before loading (and may be DeleteUnusedStyles after Clear). Parameters StyleNo – index of text style which will be used for new text. It defines font attributes for the added text. ParaNo – index of paragraph style which will be used for new text. It defines paragraph attributes for the added text. AsSingleParagraph (and DefAsSingleParagraph):
LoadTextW supports the Unicode byte order marks characters (if it's present, it must be the first character in the file). Methods type:
LoadText (text in the file must be ANSI):
LoadTextW (text in the file must be Unicode):
Return value:"Was loading successful?"
See also methods:
See also methods of TRichViewEdit: See also properties of TRVStyle: See also: |