Breaks (Horizontal Lines) in TRichView Documents

<< Click to display table of contents >>

Breaks (Horizontal Lines) in TRichView Documents

Break is a horizontal line (or rectangle) of the specified width and color.

It always occupies a full line.

Style of this item type: rvsBreak (-1)

Methods of TCustomRichView

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

AddBreak

The following viewer-style method changes the main properties of item of this type:

SetBreakInfo

The following method returns main properties of the given item of this type:

GetBreakInfo

Methods of TCustomRichViewEdit

The following editor-style method inserts item of this type at the position of caret:

InsertBreak

The following editor-style methods modify main properties of the item of this type:

SetCurrentBreakInfo,

SetBreakInfoEd

The following method returns main properties of the item of this type at the position of caret:

GetCurrentBreakInfo

Properties

Main properties of breaks: style, width, color.

In addition to the methods listed above, they are accessible as rveipcBreakStyle, rveipcBreakWidth, rveipcBreakColor properties.

Saving and loading

Export to HTML

Breaks are exported as <hr>. Color of break is retained only in CSS version (HTMLSaveProperties.HTMLSavingType = rvhtmlstNormal, or rvcsssoForceNonTextCSS is included in HTMLSaveProperties.CSSOptions).

RTF

Breaks are exported as two paragraphs, one of them with a border at the bottom side. Not imported (i.e. imported back as two paragraphs, one of them with a border at the bottom side)

Export to DocX

Breaks are exported as a special line object.

Export to Text

When saving/copying selection, breaks are not included in text. When saving to file (SaveText), saved as a sequence of LineWidth  '-' characters.

Markdown

Breaks can be saved and read from Markdown. Properties of breaks cannot be stored in Markdown. Color of breaks loaded from Markdown is defined in MarkdownProperties.DefaultItemProperties.BreakColor.