<< Click to display table of contents >> RichViewEditCaretWidth, RichViewEditCaretWidthMode, RichViewEditCaretHeightExtra, RichViewEditMaxCaretHeight, RichViewEditMinCaretHeight, RichViewEditCaretPosition, RichViewEditCustomCaretSize |
These typed constants allow to control the caret appearance in RichViewEdit.
Unit [VCL/FMX]: RVERVData / fmxRVERVData;
Syntax
type
TRVHorizontalCaretPosition =
(rvhcpDefault, rvhcpCenter, rvhcpRight);
TRVCaretWidthMode =
(rvcwmDefault, rvcwmCharacter);
const
RichViewEditCaretWidth: Integer = 0;
RichViewEditCaretWidthMode: TRVCaretWidthMode = rvcwmDefault;
RichViewEditCaretHeightExtra: Integer = 0;
RichViewEditMaxCaretHeight: Integer = 1000;
RichViewEditMinCaretHeight: Integer = 0;
RichViewEditCaretPosition: TRVHorizontalCaretPosition = rvhcpDefault;
RichViewEditCustomCaretSize: Boolean = False;
RichViewEditCaretWidthMode defines how the caret width (thickness) is calculated. The meaning of possible values are explained in the table below.
Value |
Meaning |
---|---|
rvcwmDefault |
The caret width is calculated according to RichViewEditCaretWidth, see below. |
rvcwmCharacter |
The caret has width of the next character/item. When the caret is at the end of line, its width is calculated like in rvcwmDefault mode. |
RichViewEditCaretWidth defines the width of the caret. The value 0 (default) is special, it means using the system caret thickness (defined in the "Ease of Access" of the Settings app (or the Control Panel, depending in the Windows version)).
ScaleRichView note: TSRichViewEdit uses PageProperty.CaretPen.Width like RichViewEditCaretWidth.
Value of RichViewEditCaretHeightExtra is added to the top and the bottom of the caret (negative values make the caret shorter, positive values make it longer).
RichViewEditMaxCaretHeight – maximum possible caret height.
RichViewEditMinCaretHeight – minimum possible caret height.
If RichViewEditCustomCaretSize = True, OnMeasureCustomCaret event is called not only for a custom caret, but for the standard caret as well.
The event is called after the standard caret size is calculated, but before the caret is repositioned (initially, it is positioned to the right side of the insertion position.
RichViewEditCaretPosition specifies how a wide caret is positioned relative to the insertion position.
Value |
Caret position |
rvhcpDefault |
To the left side of the insertion position for items having BiDiMode = rvbdRightToLeft, to the right side otherwise. |
rvhcpCenter |
Centered at the insertion position |
rvhcpRight |
To the right side of the insertion position |
ScaleRichView note: RichViewEditCaretPosition affects ScaleRichView as well.