<< Click to display table of contents >> Text Items in TRichView Documents |
Text item displays text in traditional (ANSI) or Unicode encoding.
Style of this item type: >=0 (index in the TextStyles collection of the linked TRVStyle).
Item of this collection (TFontInfo object) completely defines all properties of this text.
Main properties of TFontInfo:
▪Jump - determines if this text is hypertext or not;
▪properties defining font, colors, background, hypertext cursors, protection, bi-di mode, and others.
Text item cannot contain:
▪CR and LF (#13 and #10) characters;
▪TAB (#09) characters (they are inserted as tabulators or replaced with several space characters, depending on SpacesInTab);
▪#0 characters;
▪FF (#12) characters (see PageBreaksBeforeItems property of TCustomRichView).
The following viewer-style methods add item of this type to the end of the document:
▪single item: AddNL (and shortcut Add), AddFmt
▪multiple items: AddTextNL.
The following viewer-style methods change text of the given item
The following methods return text of the given item:
Appending text from file/stream:
▪LoadTextFromStream, LoadTextFromStreamW
The following editor-style methods insert item of this type at the position of caret:
▪single item: InsertStringTag, InsertStringATag, InsertStringWTag;
▪multiple items: InsertText, -A, -W.
The following editor-style methods change text of the given item:
▪SetItemTextEd -A -W, SetCurrentItemText -A -W
The following methods return text of item at the position of caret:
The following editor-style methods insert text from files at the position of caret:
▪InsertTextFromFile, InsertTextFromFileW
See also methods for copying and pasting, selecting text.
Some of the methods above can insert tabulators as well.
See also: classes for item types.