Click or drag to resize

RadioButtonGroup Class

X#
A group of radio buttons considered as a combination control, presenting a set of options and returning a single value.
Inheritance Hierarchy
Object
  VObject
    Control
      TextControl
        GroupBox
          RadioButtonGroup

Namespace:  VO
Assembly:  VOGUIClasses (in VOGUIClasses.dll) Version: 2.24 GA
Syntax
 CLASS RadioButtonGroup INHERIT GroupBox
Request Example View Source

The RadioButtonGroup type exposes the following members.

Constructors
  NameDescription
Public methodRadioButtonGroup
Construct a radio button group.
Top
Properties
  NameDescription
Public propertyTextValue
RadioButtonGroup:TextValue holds the first element of the FillUsing() array
(Overrides TextValue.)
Public propertyValue
Contains the group value setting (specified on the Window Editor Property Window) associated with the radio button within the group that is selected.
(Overrides Value.)
Top
Methods
  NameDescription
Public methodButton
Retrieve a specific radio button.
Public methodDisable
Disable a radio button group (until a subsequent call to RadioButtonGroup:Enable()).
(Overrides Disable.)
Public methodEnable
Enable a radio button group that was previously disabled.
(Overrides Enable.)
Public methodCode exampleFillUsing
Specify the radio buttons that make up the group and the set of values corresponding to these buttons, using an array.
Public methodHide
Hide a radio button group so it is not visible (until a subsequent call to RadioButtonGroup:Show()).
(Overrides Hide.)
Public methodSetFocus
Pass input focus to the selected radio button within the radio button group.
(Overrides SetFocus.)
Public methodShow
Display a radio button group so it is visible.
(Overrides Show.)
Top
Remarks
Radio buttons are commonly used to allow selection of one among a specific list of options. However, treating several radio buttons as individual controls requires explicit management of the behavior of the buttons: when one is selected, the program must turn off the other buttons in the group. Individual radio buttons are also not suited for linking to a database: databases typically do not have several fields representing linked properties, but rather a single field that can take on different values. The radio button group is a higher level control that automatically handles the interlinking of the buttons. It also links to database fields in a more intelligent way than individual radio buttons: the group as a whole is considered as one control that takes one of a number of specific values. Since the radio button group is the control that you deal with, and its constituent radio buttons are not directly referenced by the program, properties such as the hyperlabel, field specification, caption, value, and text value are attached to the group. The value is either the number of the radio button which is currently selected in the sequence or one of the values specified for a radio button in a two-dimensional array through FillUsing(). The text value is the same value formatted according to the picture clause of the field specification attached to the group (to get the caption displayed next to the radio buttons, retrieve the selected button and reference its caption property. Note that the data type and picture of the group's field specification are used and the field specs of the individual radio buttons are ignored. The radio button group behaves similarly to a list box or combo box and may be used as an alternative to any constrained single-selection list box when the number of options is small and fixed. (Although the radio button group supports variable caption strings for the individual buttons, a list box is usually a better choice for very dynamic data.) A radio button group is created empty and radio buttons are associated with it through the FillUsing() method. If you create a radio button using the Window Editor, the FillUsing( ) method in the generated source code defines a two-dimensional array, with one row for each button. The first element contains the caption of the radio button and the second element contains its group value. When a button is pressed, the radio button group's TextValue contains the first element (the button caption), and Value contains the second element (the group value). If no button is pressed, RadioButtonGroup:TextValue is NULL_STRING and RadioButtonGroup:Value is NIL. A radio button group may be bound to a field in a server. The field's data value is stored in RadioButtonGroup:Value. The radio button group compares the field's data value to the second element values specified in the FillUsing() array, and if a match is found, the first element (the button caption) is stored in RadioButtonGroup:TextValue. If there is no match, RadioButtonGroup:TextValue is NULL_STRING. If a button is pressed, the corresponding second element is stored as RadioButtonGroup:Value, and this value is written to the server.
See Also

Reference