rvico TRichView Reference | TRichViewEdit

TCustomRichViewEdit.GetCurrentBreakInfo

Top  Previous  Next

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

procedure GetCurrentBreakInfo(var AWidth: TRVStyleLength;

  var AStyle: TRVBreakStylevar AColor: TColor;

  var 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 clNone, 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".


TRichView © trichview.com