TCustomRichViewEdit.OnMeasureCustomCaret

<< Click to display table of contents >>

TCustomRichViewEdit.OnMeasureCustomCaret

Allows to define size and position for a custom caret.

type

  TRVMeasureCustomCaretEvent = procedure (Sender: TCustomRichViewEdit;

    var Rect: TRVCoordRectof object;

property OnMeasureCustomCaret: TRVMeasureCustomCaretEvent;

(introduced in version 10)

Custom caret [VCL and LCL]

A custom caret is drawn if CustomCaretInterval>0.

This event is called before each call to OnDrawCustomCaret. It allows to set your own size and position for the caret. The default size and position are the same as of the default system caret. The editor stores background under the Rect, it will be restored after the call to OnDrawCustomCaret.

Standard caret

If the global variable RichViewEditCustomCaretSize = True, this even is called for the standard caret as well. If RichViewEditCaretPosition <> rvhcpRight, the editor adjusts the position of the caret after calling this event.