TCustomRichView.SetBreakInfo

<< Click to display table of contents >>

TCustomRichView.SetBreakInfo

Changes main properties of the item of break (horizontal line) type.

procedure SetBreakInfo(ItemNo: Integer; AWidth: TRVStyleLength;

  AStyleTRVBreakStyle; AColor: TRVColorconst ATag: TRVTag);

Parameters:

ItemNo index of the item. The item must be of break type (rvsBreak), otherwise the method raises ERichViewError exception. Items are indexed from 0 to ItemCount-1, GetItemStyle returns type of item. Items of subdocuments (table cells) are not included in the items range of the main document; for items in cells, use Cell.GetRVData.SetBreakInfo.

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.You can use value returned by GetBreakInfo or GetItemTag for this item.

 

Instead of this method, you can use SetItemExtraIntPropertyEx and SetItemTag methods.

 

Method type: viewerstyle viewer-style. It's not necessary to reformat document after it, repainting is enough.

Additional item properties are assigned by the methods SetItemExtraIntProperty and SetItemExtraStrProperty.

 

Example

RichView2.SetBreakInfo(ItemNo, 1, rvbsLine, clNone, 'Break Tag');

 

See also methods:

GetBreakInfo;

GetItemStyle;

SetItemExtraIntProperty;

SetItemExtraStrProperty.

See also properties:

ItemCount.

See also methods of RichViewEdit:

SetBreakInfoEd;

SetCurrentBreakInfo.

See also:

Modifying RichView items;

Item types;

Tags.