The methods load text file FileName and insert its content in the position of caret. InsertTextFromFile inserts text from ANSI text files, InsertTextFromFileW inserts text from Unicode (UTF-16) text files.
function InsertTextFromFile(const FileName: TRVUnicodeString; CodePage: Cardinal=CP_ACP): Boolean;
function InsertTextFromFileW(const FileName: TRVUnicodeString): Boolean;
A file may contain special characters:CR, LF, TAB, FF (#13, #10, #9, #12). #9 characters may be inserted as tabulators, depending on value of SpacesInTab property of the linked RVStyle component. #12 characters add page breaks. All possible line breaks modes (CR, LF, CR+LF, LF+CR) are supported.
InsertTextFromFileW supports the Unicode byte order marks characters (if they are present, they must be the first character in file).
Methods type: editing-style method for insertion.
Internally, text is stored as Unicode. InsertTextFromFile converts ANSI to Unicode using CodePage.
Return value: "Was reading from from the file successful?"
See also methods:
See also methods of TRichView:
See also properties:
See also properties of TRVStyle: