Description

The ARadioButton control displays an option that can be turned on or off.

The button appears as a circular button with text beside it. The circular button represents the state of the button, which can be unchecked or checked. When the mouse is clicked on the control the circle is filled and appears in a checked position. When the control is clicked again, the circle is emptied. Text can be aligned to the right or left of the button.

ARadioButton controls are often used in a group from which the user selects only one of several options. ARadioButton controls are grouped by drawing them inside a container such as a GroupBox control. To do this, draw the GroupBox first and then draw the ARadioButton controls inside. All ARadioButton controls within the same container act as a single group.

The value of an ARadioButton control can be set in programs using the Value property and can be set to False (unchecked) or True (checked).

Text for the ARadioButton can be set by using the Caption property. Use the Alignment property to set the text on the left or right side of the box. The Appearance of the ARadioButton, caption text, and colors can also be set programmatically.

Properties

 

Alignment

Font3D

Left

Value

Appearance

ForeColor

Name

Visible

BackColor

GroupName

Object

WhatsThisHelpID

Caption

Height

TabStop

WhatsThisHelpText

Description

HelpContextID

Tag

Width

Enabled

hWnd

ToolTipText

 

Font

Image

Top

 

Methods

 

Move

SetFocus

ShowWhatsThis

Refresh

ShowHelpContext

ZOrder

Events

 

OnChange

OnHelpContext

OnKeyUp

OnMouseMove

OnClick

OnKeyDown

OnLostFocus

OnMouseUp

OnGotFocus

OnKeyPress

OnMouseDown

OnWhatsThisHelp

Constants

 

AOption

enumARadioButtonAlignment

Comments

The ARadioButton allows only one selection from a list of choices, whereas the ACheckBox control offers one or more selections from a list of choices.

See Also

ACheckBox, AGroupBox