OptionButton Control

OptionButton controls are used to display options, usually in option button groups, from which the user can choose one.

Syntax

OptionButton

The OptionButton control has the following properties, methods, and events.

Properties Methods Events
Alignment Move Click
Appearance Refresh DblClick
BackColor, ForeColor SetFocus GotFocus
Caption ZOrder KeyDown, KeyUp
Container KeyPress
Enabled LostFocus
Font MouseDown, MouseUp
FontBold MouseMove
FontItalic
FontStrikethru
FontUnderline
FontName
FontSize
Height, Width
HWnd
Left, Top
Name
Parent
Style
TabIndex
TabStop
Tag
Value
Visible

Remarks

You group OptionButton controls by drawing them inside a container such as a Frame control or a form. To group OptionButton controls in a Frame, draw the Frame first, and then draw the OptionButton controls inside. All OptionButton controls within the same container act as a single group.

While OptionButton controls and CheckBox controls may appear to function similarly, there is an important difference: When a user selects an OptionButton, the other OptionButton controls in the same group are automatically unavailable. In contrast, any number of CheckBox controls can be selected.