TRVStyle.InactiveSelColor, InactiveSelTextColor, SelColor, SelTextColor, SelOpacity

<< Click to display table of contents >>

TRVStyle.InactiveSelColor, InactiveSelTextColor, SelColor, SelTextColor, SelOpacity

Color of text and background of selected text in TRichView components.

property SelColor: TRVColor;

property SelTextColor: TRVColor;

property InactiveSelColor: TRVColor;

property InactiveSelTextColor: TRVColor;

property SelOpacity: TRVOpacity;

("Inactive" properties are introduced in version 1.6, SelOpacity is introduced in version 20)

If MainRVStyle is assigned, these properties provide access to the corresponding properties of MainRVStyle.

Mode 1: Opaque selection drawing

This mode is used when SelOpacity = 100000 (meaning 100% opacity).

SelColor and SelTextColor are used when the control is focused. InactiveSelColor and InactiveSelTextColor are used otherwise.

Background colors (SelColor and InactiveSelColor) are used for:

drawing background for the selected text;

shading the selected bullets and hotspots,

drawing a frame around the selected breaks,

drawing background for the selected pictures and controls,

drawing background for selected table cells.

In FireMonkey, SelColor and SelTextColor are used for drawing resizing handles and a resizing rectangle (for pictures and controls), SelColor is used for drawing a table sizing line.

Set InactiveSelColor and InactiveSelTextColor to rvclNone to hide a selection when the input focus shifts to another control.

TRichView must be linked with this TRVStyle (see TRichView.Style).

Mode 2: Semitransparent selection drawing

This mode is used when SelOpacity < 100000 (meaning semitransparency).

In this mode, only SelColor and InactiveSelColor are used (SelTextColor and InactiveSelTextColor are ignored). Selection is shaded with SelColor (if the control is focused) or InactiveSelColor (if not focused).

Default selection drawing [FMX]

In FireMonkey, if rvoDefaultSelectionFill is included in the Options property of TRichView, the component searches for 'selection' brush resource in its visual style (specified in StyleLookup property). If found, a color and an opacity of this brush resource is assigned to SelColor and SelOpacity; InactiveSelColor is assigned to the same color as SelColor but more transparent.

Note: by default, TRichView is linked with 'memostyle' visual style, and this style contains semitransparent brush resource named 'selection'.

Default values:

SelColor: rvclHighlight

SelTextColor: rvclHighlightText

InactiveSelColor: rvclHighlight

InactiveTextColor: rvclHighlightText

SelOpacity: 100000 (opaque)

See also properties:

SelectionStyle.