TCustomRichViewEdit.GetCurrentBreakInfo

<< Click to display table of contents >>

TCustomRichViewEdit.GetCurrentBreakInfo

Returns main properties for the item of break type at the position of caret.

procedure GetCurrentBreakInfo(out AWidth: TRVStyleLength;

  out AStyle: TRVBreakStyleout AColor: TRVColor;

  out ATag: TRVTag);

GetCurrentBreakInfo(...) is equivalent to TopLevelEditor.GetBreakInfo(TopLevelEditor.CurItemNo, ...).

The item must be of break type (rvsBreak), otherwise the method raises ERichViewError exception. Type of item at the position of caret is returned by CurItemStyle.

Output parameters:

AWidth – line width (or rectangle height). This value is measured in Style.Units.

AStyle – visual style of this break, see TRVBreakStyle for possible values.

AColor – line color. If it is equal to rvclNone, Style.TextStyles[0].Color is used.

ATag tag of the item. Use SetCurrentTag or SetCurrentBreakInfo to change tag of item as an editing operation.

 

Instead of this method, you can use GetCurrentItemExtraIntPropertyEx and GetCurrentTag methods.

 

This method must be called only when the document is formatted.

Additional properties of item at the position of caret are returned by the methods GetCurrentItemExtraIntProperty and GetCurrentItemExtraStrProperty.

See also methods:

SetCurrentBreakInfo (changes properties of break at the position of caret, as an editing operation);

GetBreakInfo (returns properties of the specified break).

See also properties:

CurItemNo;

CurItemStyle.

See also:

Obtaining RichView items;

Item types;

"Tags".