Tabulators in TRichView Documents

<< Click to display table of contents >>

Tabulators in TRichView Documents

Tabulators

A special item used to align the subsequent text to the next tab stop.

Tab stops are measured from the LeftMargin and defined by the following properties:

paragraph's LeftIndent (for paragraph with hanging (negative) FirstIndent);

paragraph's collection of Tabs

TRVStyle.DefTabWidth.

Style of this item type: rvsTab (-12)

Properties of this item type are defined by:

its text style (the same properties as for text items)

corresponding tab stop (item in the paragraph's collection of Tabs: TRVTabInfo)

Item of this type can be inserted in document using keyboard ( Tab  key), or together with text or RTF (Rich Text Format).

Value of SpacesInTab property of the linked TRVStyle component must be 0 (default). If it is positive, several spaces are inserted instead of tabulator.

Editor accepts  Tab  keys only if rvoWantTabs is included in EditorOption property.

Tabulators are read from RVF (RichView Format) files and streams regardless of value of SpacesInTab property.

Normally, tabulators are invisible (they can have background color and underline defined by its text style, though). They can be displayed as small arrows if rvoShowSpecialCharacters is included in TRichView.Options.

Methods of TCustomRichView

Methods that add one text item cannot insert tabulators. They always replace them with several space characters or delete.

The following viewer-style methods can add tabulators (if text contains #09 characters):

AddTextNL, AddTextNLA, AddTextNLW;

LoadText, LoadTextW, LoadTextFromStream, LoadTextFromStreamW;

AddTab adds tabulator regardless of SpacesInTab mode.

Methods of TCustomRichViewEdit

Methods that add one text item cannot insert tabulators. They always replace them with several space characters or delete.

The following editor-style methods can insert tabulators (if text contains #09 characters):

InsertText, -A, -W, InsertTextFromFile, InsertTextFromFileW

InsertTab inserts tabulator regardless of SpacesInTab mode

See also methods for pasting.