TRVStyle.OnDrawParaBack

<< Click to display table of contents >>

TRVStyle.OnDrawParaBack

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

property OnDrawParaBack: TRVDrawParaRectEvent;

VCL and LCL:

type

  TRVDrawParaRectEvent =

    procedure (Sender: TRVStyle; ACanvas: TCanvas;

      ParaNo: Integer; ARect: TRVCoordRect

      var DoDefault: Boolean) of object;

FireMonkey:

type

  TRVDrawParaRectEvent =

    procedure (Sender: TRVStyle; ACanvas: TRVFMXCanvas;

      ParaNo: Integer; ARect: TRVCoordRect

      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\*\Assorted\Custom Draw\CustomDraw\