SRVCheckBox TSRVCheckBox

Top  Previous  Next

TSRVCheckBox represents a check box that can be on (checked) or off (unchecked)

Unit SRVCheckBox;

Syntax

TSRVCheckBox = class(TSRVCustomControl)

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TSRVCustomControl

Properties and events

This component publishes the following properties inherited from TSRVCustomControl:

Alignment;

ButtonSkinSchemeIndex;

DrawOnPrint;

SkinManager;

SkinSchemeIndex;

properties inherited from TCustomControl.

New published properties:

Property

Type

Default value

Meaning

published AllowGrayed

Boolean

False

Determines whether a check box can be in a “grayed” state. Not supported in a skinned mode.

published Checked

Boolean

False

Specifies whether the check box is checked. If the AllowGrayed property is True, you may find it more useful to use the State property.

published State

TSRVCheckBoxState

cbUnchecked

Indicates whether the check box is selected (cbChecked), deselected (cbUnchecked), or grayed (cbGrayed)

Painting

A position of the box and Caption depends on Alignment:

taLeftJustify: the box and the caption is aligned to the left, the box is to the left of the caption;

taRightJustify: the box and the caption is aligned to the right, the box is to the right of the caption;

taCenter: the box is in the middle, the caption is aligned to the left.

If SkinManager is assigned, the control is drawn using SkinManager.CurrentSkin.BoxSchemes[SkinSchemeIndex], and the box is drawn using SkinManager.CurrentSkin.BoxSchemes[ButtonSkinSchemeIndex]. In this mode, a grayed state is not supported.

Example:

SRVCheckBox Scheme


ScaleRichView © Ilya Zelensky & Sergey Tkachenko