uradiogroup (RadioGroup)

The uradiogroup widget displays a set of mutually exclusive choices as a group of radio buttons. Uniface provides a logical widget called RadioGroup, which is mapped to uradiogroup.

RadioGroup widget

For more information, see Specifying a Widget for a Field or Entity and ValRep.

Widget Overview
Logical Widget Name: RadioGroup
Maps to Physical Widget : RadioGroup
Default definition: RadioGroup=uradiogroup(font=label)
Supported triggers: See Triggers
Supported properties: See Widget Properties
Use for: String fields with a ValRep containing mutually exclusive options.
Supported in Grid? No
Supports MSAA? : No

Description

Use the uradiogroup widget to display a ValRep of two or more mutually exclusive options. Selecting one option disables all other options, with each item represented by a button.

ValRep Handling

The maximum number of buttons depends on the ValRep for that widget. It is usually used for a very limited number of options.

The widget uses the ValRep list defined for the field to build up the options visible in the drop-down list. It expects a list of Value=Representation pairs and displays the representations labels for the radio buttons. If a ValRep item does not have a Representation, the Value is displayed instead. When the user selects an item, the corresponding value is selected.

For more information, see ValRep.

Triggers

Widget Properties

Radio Group Widget Properties
Property Technical Name Dynamic?
3-D Effect (3d) 3D No
Alignment or Text Position (align) Align No
Attach to Window Border (attach) Attach Yes
Attach Margin (AttachMargin) AttachMargin Yes
Background Color (BackColor) BackColor Yes
Foreground Color (ForeColor) ForeColor Yes
Frame Frame Yes
Label Font (LabelFont) LabelFont Yes
Number of Columns (Columns) Columns Yes
Number of Rows (rows) Rows Yes
Value and Representation

Yes
Widget Font (Font) Font Yes
Transparency Transparency Yes
Popup Rectangle (PopupRect) PopupRect Yes
Inherit Colors (InheritColors) InheritColors Yes

Note: The Transparency property should be set to false to ensure that the radio buttons are correctly displayed.

Character Mode

In character mode, the selected option of a radio group displays the VIEW_RADIO character. All other options display the VIEW_RADIO_OFF character. If the widget does not have enough room to display all of its options, the widget displays either the VIEW_MOREUP or VIEW_MOREDOWN character. These are displayed with the inverse of the video attributes of the widget. The video attributes of the widget are set by the $RADIO_BUTTON assignment file setting.

Related Topics