LoadText
Description
Append the content of the text file FileName in UTF-16 encoding to the document.
function LoadText (const FileName: String; StyleNo, ParaNo: Integer; DefAsSingleParagraph: Boolean): Boolean;
Parameter |
Description |
FileName |
A text file in UTF-16 encoding. |
StyleNo |
The number of the text style. Not used, use the value 0. |
ParaNo |
If ParaNo=-1, the method adds an item to the end of the last paragraph. If ParaNo>=0, this item starts a new paragraph. |
DefAsSingleParagraph |
If False, each new line will be added as a new paragraph. If True, it treats #13 and #10 as line breaks, not paragraph breaks. |
Example
Form1.RichEdit1.LoadText('d:\file.txt', 0, -1, True);