OptionButton Control

Description

Shows the selection status of one item in a group of choices.

Remarks

Use an OptionButton to show whether a single item in a group is selected. Note that each OptionButton in a Frame is mutually exclusive.

If an OptionButton is bound to a data source, the OptionButton can show the value of that data source as either Yes/No, True/False, or On/Off. If the user selects the OptionButton, the current setting is Yes, True, or On; if the user does not select the OptionButton, the setting is No, False, or Off. For example, an OptionButton in an inventory-tracking application might show whether an item is discontinued. If the OptionButton is bound to a data source, then changing the settings changes the value of that data source. A disabled OptionButton is dimmed and does not show a value.

Depending on the value of the TripleState property, an OptionButton can also have a null value.

You can also use an OptionButton inside a group box to select one or more of a group of related items. For example, you can create an order form with a list of available items, with an OptionButton preceding each item. The user can select a particular item by checking the corresponding OptionButton.

The default property for an OptionButton is the Value property.

The default event for an OptionButton is the Click event.

Properties

Accelerator property, Alignment property, AutoSize property, BackColor property, BackStyle property, BoundValue property, Caption property, ControlSource property, ControlTipText property, Enabled property, Font object, ForeColor property, GroupName property, Height, Width properties, HelpContextID property, LayoutEffect property, Left, Top properties, Locked property, MouseIcon property, MousePointer property, Name property, Object property, OldHeight, OldWidth properties, OldLeft, OldTop properties, Parent property, Picture property, PicturePosition property, SpecialEffect property, TabIndex property, TabStop property, Tag property, TripleState property, Value property, Visible property, WordWrap property.

Methods

Move method, SetFocus method, ZOrder method.

Events

AfterUpdate event, BeforeDragOver event, BeforeDropOrPaste event, BeforeUpdate event, Change event, Click event, DblClick event, Enter, Exit events, Error event, KeyDown, KeyUp events, KeyPress event, MouseDown, MouseUp events, MouseMove event.

Example

See the MatchEntry property example.