rvico TRichView Reference | Item Types

Text Items

Top  Previous  Next

Text Item

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:

Unicode - determines if this text is Unicode or not;

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).

Methods of TCustomRichView

The following viewer-style methods add item of this type to the end of the document:

single item: AddNLTag (and shortcuts AddNL, AddTag, Add), AddFmt

multiple items: AddTextNL;

multiple items, can be used in Unicode applications: AddTextNLA, AddTextNLW;

The following viewer-style methods change text of the given item

SetItemText -A -W

The following methods return text of the given item:

GetItemText -A -W

Appending text from file/stream:

LoadText, LoadTextW,

LoadTextFromStream, LoadTextFromStreamW

Methods of TCustomRichViewEdit

The following editor-style methods insert item of this type in 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:

GetCurrentItemText -A -W

The following editor-style methods insert text from files in the position of caret:

InsertTextFromFile, InsertTextFromFileW

See Also...

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.


TRichView © trichview.com