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

     ATTACH <cId> TO <aParent> GET AS PUSHBUTTON <cPrompt> ;
                  AT <nTop>, <nLeft>, <nBottom>, <nRight> ;
                  [PAGE <nPage>] ;
                  [FUNCTION <uFun>] ;
                  [COLOR <aCol>] ;
                  [ACTIVE <uActive>] ;
                  [MESSAGE <cMes>] ;
                  [REFRESHID <cRID>] ;
                  [<Pack:PACK>]        ;

Parameters:

     <cId>      Shows the name of the control 
     <aParent>  Item of objects form in which the controls are added 
     <uVar>     Name of the variable 
     AT <nTop>, <nLeft>, <nBottom>, <nRight> Coordinates of row and column
                where is the control PUSHBUTTON on the objects.
                Coordinates are of the objects
     PAGE <nPage> Number of page where is the control If nPage = 0 the
                control is available on all pages of management
     FUNCTION <uFun> Function that is executed when button is activated 
     COLOR <aCol> Array where there are attributes of color Clipper used
                for link at the control the specific color
     ACTIVE <uActive> Permit to specify in which condition the control is
                active
     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
                PACK Activates 2 rows buttons

Description:

     Makes a new control of type Push Button. The control Push Button
     permits to execute actions when pushed.
     
     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:

     Example 1 :
     
     Value of items of array when CONTROL is of type PUSHBUTTON:
     
     #include "DFCTRL.CH"
     
     LOCAL aCTRL := tbCTRLArr( oWin, "BUT0001" )
     
     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_BUT_PROMPT    ] // Prompt
     aCTRL[FORM_BUT_TOP       ] // Coordinates of BUTTON
     aCTRL[FORM_BUT_LEFT      ] //
     aCTRL[FORM_BUT_BOTTOM    ] //
     aCTRL[FORM_BUT_RIGHT     ] //
     aCTRL[FORM_BUT_CLRID     ] // Array of colors
     aCTRL[FORM_BUT_ACTIVE    ] // Condition of Activation
     aCTRL[FORM_BUT_FUNCTION  ] // Function related
     aCTRL[FORM_BUT_MESSAGE   ] // Messagge related at BUTTON
     aCTRL[FORM_BUT_PACK      ] // 2 rows button
     
     Example 2 :
     
     #include "DFCTRL.CH"
     
     ATTACH "but0012" TO oWin:W_CONTROL GET ;
       AS PUSHBUTTON "^Bolle"          ; // Init
       AT  11, 34, 13, 40              ; // Coordinates
       PAGE   1                        ; // Page
       COLOR {"W+/GR*","N/G","G+/G","B/GR*","W+/R","G+/R"} ; //Colors
       FUNCTION {||WinBolExe(2, {||Cli->CodCli},;
                            {||Cli->CodCli==BolH->CodCli},;
                            {||Cli->CodCli!=BolH->CodCli})}
       ACTIVE {||cState $ "i".AND..T.} ; // State of activation
       MESSAGE ""                        // User messagge


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