<< Click to display table of contents >>


Occurs when drawing checkpoint.

property OnDrawCheckpoint: TRVDrawCheckpointEvent;



  TRVDrawCheckpointEvent =

    procedure (Sender: TRVStyle; Canvas: TCanvas;

      X,Y, ItemNo, XShift: Integer;

      RaiseEvent: Boolean; Control: TControl;

      var DoDefault: Boolean) of object;

(introduced in version 1.3)

You can use this event to draw your own visual representation of checkpoints.

This event occurs only if rvoShowCheckpoints is included in TCustomRichView(Control).Options.

Input parameters:

Sender – TRVStyle generating the event.

Canvas – canvas to paint.

X,Y – coordinates of the top left corner of the item marked with this checkpoint. If this is the last checkpoint in document (that is not associated with any item), X = -1.

ItemNo – index of this item in Sender.RVData. (ItemNo = -1 for checkpoint without item).

XShift – how much TRichView is scrolled horizontally (>=0);

RaiseEvent – "raise event" flag of the checkpoint.

Control – TRichView control.

DoDefault is equal to True.


"Hidden" input parameter:

Sender.RVData: TPersistent, document containing the item with this checkpoint. It should be typecasted to TCustomRVFormattedData before using.


Output parameters:

DoDefault – set to False to prevent default drawing. The default procedure draws horizontal dotted line with small circle in (X,Y). The line color is either CheckpointColor or CheckpointEvColor, depending on RaiseEvent.


Using ItemNo and Sender.RVData you can get additional information about the item and the checkpoint.

For example:

uses ..., CRVFData;



  CheckpointData: TCheckpointData;

  CheckpointTag: TRVTag;

  CheckpointName: String;


  if ItemNo>=0 then


    CheckpointData :=



      CheckpointTag, CheckpointName, RaiseEvent);




See also properties:

CheckpointColor, CheckpointEvColor.

See also:

Checkpoints overview.

Demo project:

Demos\*\Assorted\Custom Draw\CustomDraw\