Label Items in TRichView Documents

<< Click to display table of contents >>

Label Items in TRichView Documents

"Label" is a non-text item looking like text. This text cannot be wrapped (always displayed on one line).

Class for this item type is TRVLabelItemInfo (see for detailed information).

Style of this item type: rvsLabel (-200)

The following items are inherited from labels:

numbered sequences

footnotes

endnotes

sidenotes

text boxes

references to notes

Related Properties of TRVStyle

FieldHighlightColor – color for highlighting label items.

FieldHighlightType specifies when to highlight label items.

Methods of TCustomRichView

The following viewer-style method adds item of this type to the end of the document:

AddItem (create TRVLabelItemInfo object, add it using AddItem)

The following method returns TRVLabelItemInfo object

GetItem

Methods of TCustomRichViewEdit

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

InsertItem (create TRVLabelItemInfo object, insert it using InsertItem)

The following method returns TRVLabelItemInfo object at the position of caret:

GetCurrentItem.

The following methods change properties as editing operations:

SetCurrentItemExtraIntPropertyEx;

SetItemExtraIntPropertyExEd;

SetCurrentItemExtraStrPropertyEx;

SetItemExtraStrPropertyExEd.

TextStyleNo property can be modified by ApplyTextStyle and ApplyStyleConversion methods.

Properties

Main properties

Text – text to display;

TextStyleNo defines font and colors. This is an index in TextStyles collection of the linked TRVStyle component;

ProtectTextStyleNo – if True, editing operations cannot change TextStyleNo;

MinWidth – minimal width for the label item;

Alignment – horizontal alignment of text (if the item width is increased by MinWidth);

Cursor – mouse cursor above this item.

RemoveInternalLeading – if True, the font internal leading is not included in the item height.

These properties are also accessible as rvespcText, rveipcProtectTextStyleNo, rveipcMinWidth, rveipcAlignment, rveipcCursor, rveipcRemoveInternalLeading properties. Accessing them in this way allows changing them in editing operations.

Layout and appearance

This item type has the following integer properties related to layout and appearance:

rvepSpacing – padding (spacing between the text and its border);

rvepBorderWidth, rvepBorderColor – width and color of a border;

rvepOuterHSpacing, rvepOuterVSpacing – horizontal and vertical spacing around the border.

Vertical Position

This item type has the following properties affecting vertical position:

VAlign;

extra integer properties: rvepVShift, rvepVShiftAbs.