srvradiobutton TSRVRadioButton

<< Click to display table of contents >>

srvradiobutton TSRVRadioButton

Radio buttons present a set of mutually exclusive options to the user; that is, only one radio button in a set can be selected at a time.

Unit SRVRadioButton;

Syntax

TSRVRadioButton = 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, SkinFontIndex;

SRVControlStyle;

properties inherited from TCustomControl.

New published properties:

Property

Type

Default value

Meaning

published Checked

Boolean

False

Determines whether the option represented by the radio button is selected.

Painting

Painting

The default radio-button appearance (if skins are not assigned) depends on SRVControlStyle: TSRVControlStyle property:

srvcsSimple (if RVControlsPainter.Theme = rvctPaleBlue):

radiobutton_simple

srvcsClassic:

radiobutton_classic

Positions of a circle and Caption depend on Alignment:

taLeftJustify: the circle and the caption are aligned to the left; the circle is to the left of the caption;

taRightJustify: the circle and the caption are aligned to the right; the circle is to the right of the caption;

taCenter: the circle and the caption are in the middle; the circle is to the left/right of the caption depending in BiDiMode.

RTL BiDiMode inverts left and right Alignment.

Note: Alignment is different from the standard TRadioButton.Alignment. In TRadioButton, there are only left and right alignments, and they define Caption position relative to a circle. In TSRVRadioButton, there are three alignments, and they define alignment of a circle and Caption in the control (so the meanings are almost opposite).

 

If SkinManager is assigned, the control is drawn using SkinManager.CurrentSkin.BoxSchemes[SkinSchemeIndex], and the circle is drawn using SkinManager.CurrentSkin.BoxSchemes[ButtonSkinSchemeIndex].

Example:

SRVRadioButton Scheme