Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- dBsee 4.6 - The Library - <b>attach ... get as radiobutton</b> dfctrl.ch http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ATTACH ... GET AS RADIOBUTTON                                   DFCTRL.CH   
Makes a new control of type Radio Button
------------------------------------------------------------------------------
Syntax:

     ATTACH <cId> TO <aParent> GET AS RADIOBUTTON <uVar> ;
                  PROMPT <cPrompt> ;
                  AT <nRow>, <nCol> ;
                  VALUE <uVal> ;
                  [ACTIVE <uActive>] ;
                  [DISPLAYIF <uDiIf>] ;
                  [REFRESHGRP <uGrp>] ;
                  [PAGE <nPage>] ;
                  [GAP <nGap>] ;
                  [COLOR <aCol>] ;
                  [MESSAGE <cMes>] ;
                  [REFRESHID <cRID>]
                  [VARNAME <cVarName>];
                  [WHENCLICKED <bClick>];

Parameters:

     <cId>      Shows the name of the control 
     <aParent>  Item of objects form in which the controls are added 
     <uVar>     Name of the variable 
     PROMPT <cPrompt> Messagges related  at control RADIOBUTTON 
     AT <nRow>, <nCol> Coordinates of row and column where is the control
                RADIOBUTTONon the objects. Coordinates are of the objects
                VALUE  <uVal> Value assigned at field or variable related
                at control when is on the Radio Button
     ACTIVE <uActive> Permit to specify in which condition the control is
                active
     DISPLAYIF <uDiIf> Conditional Display. the control in shown on the
                objects if the expression in <uDiIf> is True
     REFRESHGRP <uGrp> Specifies whiche group of controls must be updated
                when the control RADIO-BUTTON is modified
     GAP <nGap> Space between icon and  PROMPT of control 
     PAGE <nPage> Number of page where is the control If nPage = 0 the
                control is available on all pages of management
     COLOR <aCol> Array where there are attributes of color Clipper used
                for link at the control the specific color
     MESSAGE <cMes> Text that will be shown in the row of messagges when
                cursor is on the control
     REFRESHID <cRID> Show the  groups of refresh which contain the control
     VARNAME <cVarName> Name of variable if there is inheritance 
     WHENCLICKED <bClick> When the radiobutton change state codeblock
                bClick is executed. Therefore is possible to define
                operation that must be executed at the modify of valors in
                the radiobutton

Description:

     Makes a new control of type Radio Button. The control Radio Button is
     used for to select a value from a set of avalaible valors mutualy
     exclusive.
     
     For manage this CONTROL from program is necessary to use the function
     tbCTRLArr().This function will give the array that forms the CONTROL.
     With modification of this array is possible change during RUN-TIME
     characteristic of the CONTROL.

Example:

     Example1 :
     
     Value of items of array when CONTROL is of
     type RADIOBUTTON:
     
     #include "DFCTRL.CH"
     
     LOCAL aCTRL := tbCTRLArr( oWin, "RAD0001" )
     
     aCTRL[FORM_CTRL_TYP      ] // Type CONTROL
     aCTRL[FORM_CTRL_ID       ] // ID of control
     aCTRL[FORM_CTRL_RID      ] // Refresh ID of CONTROL
     aCTRL[FORM_CTRL_PAGE     ] // Page of CONTROL
     aCTRL[FORM_CTRL_STABLE   ] // Flag for stable fhe CONTROL
     aCTRL[FORM_CTRL_DISPLAYIF] // CodeBlock of "Showing only if ..."
     
     aCTRL[FORM_RAD_VAR       ] // Variabile that is shown
     aCTRL[FORM_RAD_PROMPT    ] // Prompt
     aCTRL[FORM_RAD_ROW       ] // Coordinates of RADIO
     aCTRL[FORM_RAD_COL       ] //
     aCTRL[FORM_RAD_ACTIVE    ] // Condition of Activation
     aCTRL[FORM_RAD_CLRID     ] // Array of colors
     aCTRL[FORM_RAD_MESSAGE   ] // Messagge related at RADIO
     aCTRL[FORM_RAD_GAP       ] // Space between messagge and RADIO
     aCTRL[FORM_RAD_CLICKED   ] // Function related at selection
     aCTRL[FORM_RAD_VALUE     ] // Value of ON
     
     Example2 :
     
     #include "DFCTRL.CH"
     
     ATTACH "rad0050" TO oWin:W_CONTROL GET AS RADIOBUTTON StatQta
       PROMPT "^Quantita'" ; // Init
       AT   5, 17                        ; // Coordinates
       VALUE    "1"                      ; // Value in ON
       GAP      1                        ; // Space ICON / PROMPT
       PAGE     1                        ; // Page
       COLOR    {"N/G","G+/G","W+/BG","N+/G"}  ; // Array of colors
       ACTIVE   {||cState $ "am" }       ; // State of activation
       MESSAGE ""                          // User messagge


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson