rvico TRichView Reference | TRVStyle

TRVStyle.OnDrawParaBack

Top  Previous  Next

Occurs when painting a background of paragraph of the ParaNo-th style.

property OnDrawParaBack: TRVDrawParaRectEvent;

 

type

  TRVDrawParaRectEvent =

    procedure (Sender: TRVStyle; Canvas: TCanvas;

      ParaNo: Integer; ARect: TRect; 

      var DoDefault: Boolean) of object;

(introduced in version 1.3)

You can use this event to draw your own background and/or border for some or all paragraphs.

Input parameters:

Sender – TRVStyle generating the event.

Canvas – canvas to paint.

ARect – rectangle where to paint.

ParaNo – index in the collection of paragraph styles (ParaStyles).

DoDefault is equal to True.

 

"Hidden" input parameters:

Sender.RVData: TPersistent, document containing this paragraph. It should be typecasted to TCustomRVFormattedData before using.

Sender.ItemNo: Integer, index of the last item in the paragraph, in Sender.RVData.

 

Output parameters:

DoDefault – set to False to prevent default drawing.

 

See also properties:

ParaStyles;

TParaInfo.Background.

See also:

RichView Paragraphs.

Demo project:

Demos\Delphi\Assorted\Custom Draw\CustomDraw\

Demos\CBuilder\Assorted\Custom Draw\CustomDraw\


TRichView © trichview.com