User Tools

Site Tools


radio_declare_a_radio_button_control_.htm
Navigation:  Language Reference > 8 - Controls > Control Declarations >====== RADIO (declare a radio button control) ====== Previous pageReturn to chapter overviewNext page

RADIO(text) ,AT( ) [,CURSOR( )] [,USE( )] [,LAYOUT( )] [,DISABLE] [,KEY( )] [,MSG( )] [,HLP( )] [,SKIP]

[,FONT( )] [,ICON( )] [,FULL] [,SCROLL] [,HIDE] [,ALRT( )] [DROPID( )] [VALUE( )]
[,TIP( )] [,TRN] [,COLOR( )] [,FLAT] [, LEFT ] [,EXTEND( )]
RIGHT

blk2blue.jpg

RADIO Places a radio button on the WINDOW or TOOLBAR.
text A string constant containing the text to display for the radio button (PROP:Text). This may contain an ampersand (&) to indicate the “hot” letter for the radio button.
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 A field equate label to reference the control in executable code (PROP:USE).
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 opens (PROP:DISABLE).
KEY Specifies an integer constant or keycode equate that immediately selects the radio button (PROP:KEY). Not valid in a REPORT.
MSG Specifies a string constant containing the text to display in the status bar when the control has focus (PROP:MSG). Not valid in a REPORT.
HLP Specifies a string constant containing the help system identifier for the control (PROP:HLP). Not valid in a REPORT.
SKIP Specifies the control does not receive input focus and may only be accessed with the mouse or accelerator key (PROP:SKIP). Not valid in a REPORT.
FONT Specifies the display font for the control (PROP:FONT).
ICON Specifies an image file or standard icon to display on the face of a “latching” button (PROP:ICON). Not valid in a REPORT.
FULL Specifies the control expands to occupy the entire size of the WINDOW for any missing AT attribute width or height parameter (PROP:FULL). Not valid in a REPORT.
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.
ALRT Specifies “hot” keys active for the control (PROP:ALRT). Not valid in a REPORT. If you need to alert the same key on every RADIO control then assign it to the parent OPTION control.
DROPID Specifies the control may serve as a drop target for drag-and-drop actions (PROP:DROPID). Not valid in a REPORT.
VALUE Specifies the value the OPTION structure's USE variable receives when the radio button is selected by the user (PROP:VALUE).
TIP Specifies the text that displays as “balloon help” when the mouse cursor pauses over the control (PROP:ToolTip). Not valid in a REPORT.
TRN Specifies the control transparently displays over the background (PROP:TRN).
COLOR Specifies a background color for the control (PROP:COLOR).
FLAT Specifies the button appears flat except when the mouse cursor passes over the control (PROP:FLAT). Requires the ICON attribute. Not valid in a REPORT.
LEFT Specifies the text appears to the left of the radio button (PROP:LEFT).
RIGHT Specifies the text appears to the right of the radio button (PROP:RIGHT). This is the default position.
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.

The RADIO control places a radio button on the WINDOW, TOOLBAR, or REPORT at the position and size specified by its AT attribute. It is valid in Clarion Win32 Windows, and also for REPORT structures in both Clarion Win32 and Clarion#. A RADIO control may only be placed within an OPTION control. When selected by the user, the RADIO text (with any accelerator key ampersand stripped out) is placed in the OPTION's USE variable, unless the VALUE attribute is used. On a REPORT, the RADIO selected by the user (the value in the OPTION's USE variable) is displayed as a filled RADIO button.

A RADIO with an ICON attribute appears as a “latched” pushbutton with the image on the button face. When the button appears “up” the RADIO is off; when it appears “down” the RADIO is on and the OPTION's USE variable receives the value in the selected RADIO's text parameter (unless the VALUE attribute is used).

There is an EVENT:Selected is generated for a RADIO control, but the OPTION structure containing it receives the EVENT:Accepted.

Events Generated:

EVENT:Selected The control has received input focus.
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.

Example:

MDIChild WINDOW('Child One'),AT(0,0,320,200),MDI,MAX,HVSCROLL

     OPTION('Option 1'),USE(OptVar1)

      RADIO('Radio 1'),AT(0,0,20,20),USE(?R1),KEY(F10Key)

      RADIO('Radio 2'),AT(20,0,20,20),USE(?R2),MSG('Radio 2')

     END

     OPTION('Option 2'),USE(OptVar2)

      RADIO('Radio 3'),AT(40,0,20,20),USE(?R3),FONT('Arial',12)

      RADIO('Radio 4'),AT(60,0,20,20),USE(?R4),CURSOR(CURSOR:Wait)

     END

     OPTION('Option 3'),USE(OptVar3)

      RADIO('Radio 5'),AT(80,0,20,20),USE(?R5),HLP('Radio5Help')

      RADIO('Radio 6'),AT(100,0,20,20),USE(?R6)

     END

     OPTION('Option 4'),USE(OptVar4)

      RADIO('Radio 7'),AT(120,0,20,20),USE(?R7),ICON('Radio1.ICO')

      RADIO('Radio 8'),AT(140,0,20,20),USE(?R8),ICON('Radio2.ICO')

     END

     OPTION('Option 5'),USE(OptVar5)

      RADIO('Radio 9'),AT(100,20,20,20),USE(?R9),LEFT

      RADIO('Radio 10'),AT(120,20,20,20),USE(?R10),LEFT

     END

     OPTION('Option 6'),USE(OptVar6),SCROLL

      RADIO('Radio 11'),AT(200,0,20,20),USE(?R11),SCROLL

      RADIO('Radio 12'),AT(220,0,20,20),USE(?R12),SCROLL

     END

   END

CustRpt   REPORT,AT(1000,1000,6500,9000),THOUS

CustDetail DETAIL,AT(0,0,6500,1000)

      OPTION('Option'),USE(OptVar),AT(80,0,20,20),BOXED

       RADIO('Radio 1'),AT(80,0,20,20),USE(?R1)

       RADIO('Radio 2'),AT(100,0,20,20),USE(?R2)

       RADIO('Radio 3'),AT(100,0,20,20),USE(?R2),LEFT

      END

     END

    END

See Also:

OPTION

CHECK

BUTTON

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