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 checkbox</b> dfctrl.ch http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ATTACH ... GET AS CHECKBOX                                      DFCTRL.CH   
Makes a new control of type Check Box
------------------------------------------------------------------------------
Syntax:

     ATTACH <cId> TO <aParent> GET AS CHECKBOX <uVar> ;
                  PROMPT <cPrompt>;
                  AT <nRow>, <nCol> ;
                  VALUEON  <uValOn> ;
                  VALUEOFF <uValOff> ;
                  [ACTIVE <uActive>] ;
                  [DISPLAYIF <uDiIf>] ;
                  [REFRESHGRP <uGrp>] ;
                  [GAP <nGap>] ;
                  [PAGE <nPage>] ;
                  [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 CHECKBOX 
     AT <nRow>, <nCol> Coordinates of row and column where is the control
                CHECKBOX on the objects. Coordinates are of the objects
                VALUEON  <uValOn> Value when control is active
     VALUEOFF <uValOff> Value when control is inactive 
     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 CHECH-BOX 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 checkbox change state codeblock bClick
                is executed. Therefore is possible to define operation
                that must be executed at the modify of valors in the
                checkbox

Description:

     Makes a new control of type Check Box. A control Check Box is shown
     with a cell from the side of description, and manages only 2 buttons:
     on or off.
     
     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 CHECKBOX:
     
     #include "DFCTRL.CH"
     
     LOCAL aCTRL := tbCTRLArr( oWin, "CHK0001" )
     
     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_CHK_VAR       ] // Variabile that is shown
     aCTRL[FORM_CHK_PROMPT    ] // Prompt
     aCTRL[FORM_CHK_ROW       ] // Coordinates of CHECK
     aCTRL[FORM_CHK_COL       ] //
     aCTRL[FORM_CHK_ACTIVE    ] // Condition of Activation
     aCTRL[FORM_CHK_CLRID     ] // Array of colors
     aCTRL[FORM_CHK_MESSAGE   ] // Messagge associated at the CHECK
     aCTRL[FORM_CHK_GAP       ] // Space between messagge and CHECK
     aCTRL[FORM_CHK_CLICKED   ] // Function related at selection
     aCTRL[FORM_CHK_VALUEON   ] // Value of ON
     aCTRL[FORM_CHK_VALUEOFF  ] // Value of OFF
     
     Esempio2 :
     
     #include "DFCTRL.CH"
     
     ATTACH "ckb0050" TO oWin:W_CONTROL GET AS CHECKBOX StatQta
       PROMPT "^Quantita'"               ; // Assign
       AT   5, 17                        ; // Coordinates
       VALUEON  "1"                      ; // Value in ON
       VALUEOFF "0"                      ; // Value in OFF
       GAP      1                        ; // Space ICON / PROMPT
       PAGE     1                        ; // Page
       COLOR    {"N/G","G+/G","W+/BG","N+/G"}  ; // Colors
       ACTIVE   {||cState $ "am" }       ; // Active
       MESSAGE ""                          // User's messagge


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