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

     ATTACH <cId> TO <aParent> GET AS SPINBUTTON <uVar> ;
                  AT <nRow>, <nCol> ;
                  [PAGE <nPage>] ;
                  [GAP <nGap>] ;
                  [PICTURESAY <cPicSay>] ;
                  [DISPLAYIF <uDiIf>] ;
                  [ARRAY <aSource>] ;
                  [MIN <nMin>] ;
                  [MAX <nMax>] ;
                  [STEP <nStep>] ;
                  [REFRESHGRP <uGrp>] ;
                  [MESSAGE <cMes>] ;
                  [COLOR <aCol>] ;
                  [PROMPT <cPrompt>] ;
                  [PROMPTAT <nPRow>, <nPCol>] ;
                  [REFRESHID <cRID>] ;
                  [ACTIVE <uActive>] ;
                  [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 
     AT <nTop>, <nLeft>, <nBottom>, <nRight> Coordinates of row and column
                where is the control SPINBUTTON 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
     GAP <nGap> Space between icon and PROMPT of control 
     PICTURESAY <cPicSay> Picture that is used for to format date that is
                shown
     DISPLAYIF <uDiIf> Conditional Display. the control in shown on the
                objects if the expression in <uDiIf> is True
     ARRAY <aSource> Inits a static array where items are data tha can be
                assigned at field or at variable related at control
     MIN <nMin> Min value of data that are in the control Spin Button 
     MAX <nMax> Max value of data that are in the control Spin Button 
     STEP <nStep> Step whit which to increase/decrease data related at
                control
     REFRESHGRP <uGrp> Specifies whiche group of controls must be updated
                when the control SPIN-BUTTON is modified
     MESSAGE <cMes> Text that will be shown in the row of messagges when
                cursor is on the control
     COLOR <aCol> Array where there are attributes of color Clipper used
                for link at the control the specific color
     PROMPT <cPrompt> Messagges related  at control SPINBUTTON 
     PROMPTAT <nPRow>, <nPCol> Coordinates on which there is the PROMPT of
                control SPINBUTTON
     REFRESHID <cRID> Show the  groups of refresh which contain the control
     ACTIVE <uActive> Permit to specify in which condition the control is
                active
     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 Spin Button. Control Spin Button permit to
     select a date from a set of values.
     
     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 SPINBUTTON:
     
     #include "DFCTRL.CH"
     
     LOCAL aCTRL := tbCTRLArr( oWin, "SPB0001" )
     
     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_SPN_VAR       ] // Variable that is shown
     aCTRL[FORM_SPN_ROW       ] // Coordinates of SPINBUTTON
     aCTRL[FORM_SPN_COL       ] //
     aCTRL[FORM_SPN_PROMPT    ] // Prompt
     aCTRL[FORM_SPN_PROW      ] // Coordinates of Prompt
     aCTRL[FORM_SPN_PCOL      ] //
     aCTRL[FORM_SPN_PICTURESAY] // Picture of SAY
     aCTRL[FORM_SPN_MESSAGE   ] // Messagge related at SPINBUTTON
     aCTRL[FORM_SPN_ACTIVE    ] // Condition of Activation
     aCTRL[FORM_SPN_CLRID     ] // Array fo colors
     aCTRL[FORM_SPN_ARRAY     ] // Array of SPINBUTTON
     aCTRL[FORM_SPN_MIN       ] // Min Value of SPINBUTTON
     aCTRL[FORM_SPN_MAX       ] // Max Value of SPINBUTTON
     aCTRL[FORM_SPN_STEP      ] // Step of SPINBUTTON
     aCTRL[FORM_SPN_CLICKED   ] // Codeblock executed after click
     
     Example 2 :
     
     #include "DFCTRL.CH"
     
     ATTACH "spb0024" TO oWin:W_CONTROL GET
       AS SPINBUTTON ScnBol              ; // Init
       AT   5, 13                        ; // Coordinates
       PAGE  1                           ; // Page
       COLOR {"N/G","G+/G","N/W*","W+/BG","N/W*"} ; // Colors
       PROMPT     "^Sconto %"            ; // Prompt
       PROMPTAT     5 ,  1               ; // Coordinates prompt
       PICTURESAY "99"                   ; // Picture in say
       DISPLAYIF  {||.T.}                ; // Show of...
       MIN        5                      ; // Min Value
       MAX        60                     ; // Max Value
       STEP       5                      ; // Step
       REFRESHGRP "totale"               ; // Refresh of groups
       ACTIVE   {||cState $ "am" }       ; // Active
       MESSAGE ""                          // User Messagge
     
     ATTACH "spb0026" TO oWin:W_CONTROL GET
       AS SPINBUTTON StdBol              ; // Init
       AT  19, 21                        ; // Coordinates
       PAGE  1                           ; // Page
       COLOR {"GR+/B*","G+/G","GR+/B*","GR+/B*","GR+/B*"} ; // Colors
       PICTURESAY "XXXXXXXXXXXXXXXXXXXX" ; // Picture say
       DISPLAYIF  {||.T.}                ; // Show if...
       ARRAY {"String1","String2","String3"}
       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