Progress
Language Reference


RADIO-SET Phrase

Interfaces
OS
SpeedScript
All
All
No

Describes a radio set representation for a field or variable. The RADIO-SET phrase is an option of the VIEW-AS phrase.

SYNTAX

RADIO-SET
  [ HORIZONTAL [ EXPAND ] | VERTICAL ] 
  [ size-phrase ]
  RADIO-BUTTONS label, value [ , label , value ] ...
  [ TOOLTIP tooltip ] 

HORIZONTAL

Specifies that the radio buttons are aligned horizontally. Vertical alignment is the default.

VERTICAL

Specifies that the radio buttons are aligned vertically. Because this is the default alignment, you do not have to supply this attribute.

EXPAND

Pads all button labels to be the width of the widest radio button label. This ensures that the buttons are evenly spaced. Use this option only in conjunction with the HORIZONTAL option. If you do not specify this option, the individual radio buttons are spaced evenly if the lengths of the labels vary.

size-phrase

Specifies the outside dimensions of the radio-set widget. This is the syntax for size-phrase.

SYNTAX
{ SIZE | SIZE-CHARS | SIZE-PIXELS } width BY height 

For further information, see the SIZE Phrase reference entry.

RADIO-BUTTONS label, value [ , label, value ] . . .

A list of radio buttons whose selections are mutually exclusive. Each button is composed of a label and value pair. The label is a character string that is the label for the radio button. The value is the value to be assigned to the field or variable if the radio button is selected; value must be a valid value for the field or variable.

You can designate a character within each label as a navigation mnemonic on Windows. Indicate the character by preceding it with an ampersand (&). When the radio set is displayed, the mnemonic is underlined. The user can choose to the specific button by pressing ALT and the underlined letter.

NOTE: If two or more buttons of a radio set use the same label, the Progress 4GL uses only the value of the first button.

TOOLTIP tooltip

Allows you to define a help text message for a text field or text variable. Progress automatically displays this text when the user pauses the mouse button over a text field or text variable for which a tooltip is defined.

You can add or change the TOOLTIP option at any time. If TOOLTIP is set to “” or ? (the unknown value), then the tooltip is removed. No tooltip is the default. The TOOLTIP option is supported on Windows only.

EXAMPLE

This procedure displays a radio set that consists of three radio buttons and prompts the user to select one of the buttons. When the user selects the button, the program displays the text “This event occurred on” and the date value of selected button.

r-radio1.p
DEFINE VARIABLE hist-date AS DATE FORMAT "99/99/9999" INITIAL 07/04/1776
             VIEW-AS RADIO-SET                          
             RADIO-BUTTONS "Declaration of Independence", 07/04/1776,
                           "Lee Surrenders to Grant", 04/07/1865,
                           "Man Walks on Moon", 07/11/1969.
                           
FORM
   hist-date
   WITH FRAME main-frame NO-LABELS TITLE "Dates in US History".ON VALUE-CHANGED 
OF hist-date
   DO:
    ASSIGN hist-date.
    DISPLAY "This event occurred on " + STRING(hist-date) FORMAT "x(60)"
        WITH FRAME main-frame.
   END.        
ENABLE hist-date WITH FRAME main-frame.APPLY "VALUE-CHANGED" TO hist-date.
    
WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW. 

SEE ALSO

VIEW-AS Phrase


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095