User Tools

Site Tools

Navigation:  Language Reference > 8 - Controls > Control Declarations >====== OPTION (declare a set of RADIO controls) ====== Previous pageReturn to chapter overviewNext page
OPTION(text), AT( ) [,CURSOR( )] [,USE( )] [,LAYOUT( )][,DISABLE] [,KEY( )] [,MSG( )] [,HLP( )] [,BOXED]
[,FULL] [,SCROLL] [,HIDE] [,FONT( )] [,ALRT( )] [,SKIP] [DROPID( )] [,TIP( )] [,TRN]
[,COLOR( )] [,BEVEL( )] [,EXTEND( )]


OPTION Declares a set of RADIO controls.
Text A string constant containing the prompt for the set of controls (PROP:Text). This may contain an ampersand (&) to indicate the “hot” letter for the prompt. The text is displayed on screen only if the BOXED attribute is also present.
AT Specifies the initial size and location of the control (PROP:AT). If omitted, default values are selected by the runtime library.
CURSOR Specifies a mouse cursor to display when the mouse is positioned over the control (PROP:CURSOR). If omitted, the WINDOW's CURSOR attribute is used, else the Windows default cursor is used. Not valid in a REPORT.
USE The label of a variable to receive the choice (PROP:USE). If this is a string variable, it receives the value of the RADIO string (with any accelerator key ampersand stripped out) selected by the user. If a numeric variable, it receives the ordinal position within the OPTION of the RADIO button selected by the user (the value returned by the CHOICE() procedure).
LAYOUT Specifies the control's left-to-right or right-to-left display orientation (PROP:LAYOUT)
DISABLE Specifies the control appears dimmed when the WINDOW or APPLICATION is first opened (PROP:DISABLE).
KEY Specifies an integer constant or keycode equate that immediately gives focus to the currently selected RADIO in the OPTION control (PROP:KEY). Not valid in a REPORT.
MSG Specifies a string constant containing the default text to display in the status bar when any control in the OPTION has focus (PROP:MSG). Not valid in a REPORT.
HLP Specifies a string constant containing the default help system identifier for any control in the OPTION (PROP:HLP). Not valid in a REPORT.
BOXED Specifies a single-track border around the RADIO controls with the text at the top of the border (PROP:BOXED).
FULL Specifies the control expands to occupy the entire size of the WINDOW or REPORT band for any missing AT attribute width or height parameter (PROP:FULL).
SCROLL Specifies the control scrolls with the window (PROP:SCROLL). Not valid in a REPORT.
HIDE Specifies the control does not appear when the WINDOW or APPLICATION is first opened (PROP:HIDE). UNHIDE must be used to display it.
FONT Specifies the display font for the control and the default for all the controls in the OPTION (PROP:FONT).
ALRT Specifies “hot” keys active for the controls in the OPTION (PROP:ALRT). Not valid in a REPORT.
SKIP Specifies the controls in the OPTION do not receive input focus and may only be accessed with the mouse or accelerator key (PROP:SKIP). Not valid in a REPORT.
DROPID Specifies the control may serve as a drop target for drag-and-drop actions (PROP:DROPID). Not valid in a REPORT.
TIP Specifies the text that displays as “balloon help” when the mouse cursor pauses over the control (PROP:ToolTip). Not valid in a REPORT.
COLOR Specifies a background color for the control (PROP:COLOR).
BEVEL Specifies custom 3-D effect borders (PROP:BEVEL). Not valid in a REPORT.
TRN Specifies the text or USE variable characters transparently display over the background (PROP:TRN).
READONLY Sets the Radio buttons contained within the Option control to READONLY (PROP:READONLY)
EXTEND Specifies special document formatting information. This information contains a valid string of attributes that are assigned to a designated REPORT control for a given document type. Valid only in a REPORT.
Radios Multiple RADIO control declarations.

The OPTION control declares a set of RADIO controls which offer the user a list of choices. It is valid in Clarion Win32 Windows, and also for REPORT structures in both Clarion Win32 and Clarion#. The multiple RADIO controls in the OPTION structure define the choices offered to the user. On a REPORT, the OPTION control prints a group of RADIO controls which display a list of choices. The selected choice is identified by a filled RADIO button.

Input focus changes between the OPTION's RADIO controls are signalled only to the individual RADIO controls affected. This means the EVENT:Selected events generated when the user changes input focus within an OPTION structure are field-specific events for the affected RADIO controls, not the OPTION structure which contains them. There is no EVENT:Selected generated for an OPTION structure. However, the RADIO control does not receive EVENT:Accepted, the OPTION structure receives the EVENT:Accepted when the user has selected a RADIO.

A string variable as the OPTION structure's USE attribute receives the text of the RADIO control selected by the user, and the CHOICE(?Option) procedure returns the number of the selected RADIO button. If the contents of the OPTION structure's USE attribute is a numeric variable, it receives the number of the RADIO button selected by the user (the value returned by the CHOICE procedure).

No RADIO button selected is a valid option, which occurs only when the OPTION structure's USE variable does not contain a value related to one of its component RADIO controls. This condition only lasts until the user has selected one of the RADIOs.

While OPTIONs can alert keys via ALRT, the EVENT:AlertKey and EVENT:PreAlertKey events are posted to the active RADIO control with focus.

Events Generated:

EVENT:Accepted One of the OPTION's RADIO controls has been selected by the user.
EVENT:PreAlertKey The user pressed an ALRT attribute hot key.
EVENT:AlertKey The user pressed an ALRT attribute hot key.
EVENT:Drop A successful drag-and-drop to the control.


MDIChild WINDOW('Child One'),AT(0,0,320,89),HVSCROLL,GRAY,MAX,MDI
      OPTION('Option 1'),AT(24,15,56,48),USE(OptVar1),HLP('~Option1Help')
        RADIO('Radio 1'),AT(31,24,41,12),USE(?R1)
        RADIO('Radio 2'),AT(31,37,38,14),USE(?R2)
      OPTION('Option 2'),AT(97,16,56,47),USE(OptVar2),SCROLL,MSG('Option 2')
        RADIO('Radio 3'),AT(101,24,41,12),USE(?R3)
        RADIO('Radio 4'),AT(101,39,41,12),USE(?R4)
      OPTION('Option 3'),AT(164,17,59,47),USE(OptVar3),BOXED
        RADIO('Radio 5'),AT(169,27,41,12),USE(?R5)
        RADIO('Radio 6'),AT(169,40,41,12),USE(?R6)
      OPTION('Option 4'),AT(235,11,56,54),USE(OptVar4),FONT('Arial',12,,)
        RADIO('Radio 7'),AT(242,19,41,12),USE(?R7)
        RADIO('Radio 8'),AT(242,39,41,12),USE(?R8)
CustRpt REPORT,AT(1000,1000,6500,9000),THOUS
CustDetail DETAIL,AT(,,6500,1000)
          RADIO('Radio 1'),AT(156,219,979,219),USE(?R1)
          RADIO('Radio 2'),AT(156,500,1000,219),USE(?R2)

See Also:




option_declare_a_set_of_radio_controls_.htm.txt · Last modified: 2021/04/15 15:57 by