Option Button Control

An option button displays an option that can be turned on or off.

Client support

Newlook Smartclient

Newlook Server

Use

Option buttons (also known as radio buttons) are useful when you want to restrict the user selection to only one choice from a group of options.

Checkbox and option button controls function similarly but with an important difference; any number of check box controls on a form can be selected at the same time. In contrast, only one option button in a group can be selected at any given time.

Host generated option buttons

A group of option buttons is automatically generated in the GUI whenever the Newlook recognition engine detects an entry field associated with a defined set of field choice values on the host screen.

Combo vs option button recognition

In determining whether a combo box or option button will be generated, the Newlook recognition engine will try to determine if the field choice values provided on the host screen are a complete set of options or not. If there is some indication on the host screen that additional values will be accepted in the field, for instance the options are inconsistent, the more keyword is provided or the ... character then a combo box control will be generated. If the recognition engine identifies the field choice value selection as a complete set then option buttons will be generated.

The following are a small example of the types of screen element combinations that will result in the automatic generation of a group of option buttons:

All automatically generated option buttons have their BuddyValue, BuddyControl and set so that they are sending the correct value to the relevant host entry field when selected. If the underlying host screen contains both FieldChoiceValues and FieldChoiceDescriptions then the description will be stored in the Text property and the value will be stored in the BuddyValue property.

Inserted option button controls

Usually, option buttons are used as part of an option group to display multiple choices from which the user can select only one. You can group option buttons by drawing them inside a frame, panel, Tab or directly on a window. All option buttons within a container, such as a frame, are treated as a group. Option buttons on a window are also treated as a separate group from any option buttons in a container.

The GroupStart property can be used to create multiple independent groups of option buttons. Set the GroupStart property to True for the first option button in each group.

TIP!

To display text next to the option button, set the Caption property. Use the Value property to set or determine the state of the control—selected (1) or unselected (0).

Material skin considerations

When the material skin is enabled in your solution, option buttons will be rendered with material styling. The most noticeable difference is a change in styling when the button is selected. There is no change to the behavior of this control or any supported properties.

Material skin

Classic skin

See Also

Combo box control


© 2004-2021 looksoftware. All rights reserved.