OptionButton Control

This control displays one or more items, from which a user chooses only one.

Syntax

OptionButton

The OptionButton control supports the following properties:

Alignment FontStrikethru Parent
Appearance FontUnderline Style
BackColor FontName TabIndex
Caption FontSize TabStop
Container ForeColor Tag
Enabled Height Top
Font HWnd Value
FontBold Left Visible
FontItalic Name Width

The OptionButton control supports the following methods:

The OptionButton control supports the following events:

Click KeyUp
DblClick LostFocus
GotFocus MouseDown
KeyDown MouseMove
KeyPress MouseUp

Remarks

You group OptionButton controls by drawing them inside a container, such as a Frame control or a form. To group an OptionButton control in a Frame, draw the Frame first, and then draw the OptionButton control 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, a user can select any number of CheckBox controls.