TSRVWinControl

<< Click to display table of contents >>

TSRVWinControl

TSRVWinControl is the base class for all SRVControls that are wrappers for Microsoft Windows screen objects.

Unit SRVControl;

Syntax

TSRVWinControl = class(TWinControl);

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

Properties and events

Public properties:

Property

Type

Default value

Meaning

AutoDarkMode

Boolean

True

If True, and the control is inserted in a dark-mode editor (TSRichViewEdit or TRichView), luminance of all colors is inverted.

Otherwise, DarkMode property is used.

Supported only if SRVControlStyle = srvcsSimple.

readonly CaretPos

TPoint

 

Read-only. Returns the caret position in the control. If the control does not have a caret, returns (-1, -1).

readonly CaretHeight

Integer

 

Read-only. Returns the caret height in the control.  If the control does not have a caret, returns -1.

DarkMode

Boolean

False

If True, luminance of all colors are inverted.

This property is used only if the control is not inserted in an editor, or if AutoDarkMode = False.

Supported only if SRVControlStyle = srvcsSimple.

DrawOnPrint

Boolean

True

if True, this control will be printed

DisabledBorderWidth

Integer

1

Border width in disabled state

EnabledBorderWidth

Integer

1

Border width in normal state

FocusedBorderWidth

Integer

1

Border width when the control is focused

readonly MouseIn

Boolean

 

Read-only. Returns True, if the mouse pointer is above the control

MouseInBorderWidth

Integer

1

Border width when the control is below the mouse pointer

Public properties working only if SRVControlStyle = srvcsClassic

Property

Type

Default value

Meaning

DisabledBorderColor

TColor

$B8D8D7

Border color in a disabled state

EnabledBorderColor

TColor

$BF9F7F

Border color in a normal state

FocusedBorderColor

TColor

clBlue

Border color when the control is focused

MouseInBorderColor

TColor

clRed

Border color when the control is below the mouse pointer

Public events:

OnMouseEnter, OnMouseLeave (TNotifyEvent) occur when the mouse pointer enter/leaves the control.

Protected properties:

Property

Type

Default value

Meaning

protected SkinManager

TSRVSkinManager

 

A link to a skin manager component.

protected SkinSchemeIndex

Integer

0

An index in a scheme in SkinManager.CurrentSkin (a scheme depends on the control type)

protected ScrollBarSkinSchemeIndex

Integer

0

An index in SkinManager.CurrentSkin.VerticalScrollBarSchemes collection, for controls having scrollbars

protected ItemSkinSchemeIndex

Integer

0

An index in SkinManager.CurrentSkin.BoxSchemes collection, for controls having items

protected EditSkinSchemeIndex

Integer

0

An index in SkinManager.CurrentSkin.BoxSchemes collection, for controls having an embedded text editor

protected ButtonSkinSchemeIndex

Integer

0

An index in SkinManager.CurrentSkin.BoxSchemes collection, for controls having an embedded button

protected SRVControlStyle

TSRVControlStyle

srvcsSimple

Defines a visual appearance

Inherited classes

TSRVEditControl

TSRVCustomListBox