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

     ATTACH <cId> TO <aParent> GET AS COMBO <uVar> ;
                  AT <nRow>, <nCol> ;
                  [PAGE <nPage>] ;
                  [PICTUREGET <cPicGet>] ;
                  [PICTURESAY <cPicSay>] ;
                  [CONDITION <uCond>] ;
                  [ACTIVE <uActive>] ;
                  [PROMPT <cPrompt>] ;
                  [PROMPTAT <nPRow>, <nPCol>] ;
                  [DISPLAYIF <uDiIf>] ;
                  [SYSFUNCTION <uSys>] ;
                  [REFRESHGRP <uGrp>] ;
                  [LISTBOX <oList>] ;
                  [MESSAGE <cMes>] ;
                  [GAP <nGap>] ;
                  [PFK <aPfk>] ;
                  [VARNAME <cVarName>];
                  [ACT <cAct>] ;
                  [COLOR <aCol>] ;
                  [DATACHECK <dChk>]  ;
                  [REFRESHID <cRID>]

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 <nRow>, <nCol> Coordinates of row and column where is the control
                Combo Box 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
     PICTUREGET <cPicGet> Picture used for to format date that is inserted 
     PICTURESAY <cPicSay> Picture used for to format date that is shown 
     CONDITION <uCond> Condition of validation 
     ACTIVE <uActive> Allow to specify in which condition the control is
                active
     PROMPT <cPrompt> Messagge that is associated at control Combo Box 
     PROMPTAT <nPRow>, <nPCol> Coordinates where is the PROMPT of the
                control GET
     DISPLAYIF <uDiIf> Conditional Display. the control in shown on the
                objects if the expression in <uDiIf> is True
     SYSFUNCTION <uSys> Function of sys. When control is active, the
                function defined in <uSys> is executed if a button is
                pushed
     REFRESHGRP <uGrp> Specifies which group of control must be updated
                when is modified the control Combo Box
     MESSAGE <cMes> Text that will be shown in the row of messagges when
                cursor is  on the control
     GAP <nGap> Space between icon and  PROMPT of control 
     PFK <aPfk> Array of buttons actives on control 
     VARNAME <cVarName> Name of variable if there is inheritance 
     ACT <cAct> String that contain other actions for to release during get
     COLOR <aCol> Array where there are attributes of color Clipper used
                for link at the control the specific color
     DATACHECK <bChk> Codeblock that enable control of data of combo that
                there is in the list-box related If the CODEBLOCK return
                .T. will be insert the value of combo in the first column
                of the list-box else date is not checked
     REFRESHID <cRID> Show the  groups of refresh which contain the control

Description:

     Makes a new control of type GET on the objects Form. This control is
     used for to edit the variable  fields that is parameter <uVar>. At
     that control is related for default a window of search.
     
     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 if the type of  CONTROL is COMBO :
     
     #include "DFCTRL.CH"
     
     LOCAL aCTRL := tbCTRLArr( oWin, "CMB0001" )
     
     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_CMB_VAR       ] // Variable that is shown
     aCTRL[FORM_CMB_ROW       ] // Coordinates of COMBO
     aCTRL[FORM_CMB_COL       ] //
     aCTRL[FORM_CMB_PROMPT    ] // Prompt
     aCTRL[FORM_CMB_PROW      ] // Coordinates of Prompt
     aCTRL[FORM_CMB_PCOL      ] //
     aCTRL[FORM_CMB_PICTUREGET] // Picture of GET
     aCTRL[FORM_CMB_PICTURESAY] // Picture of SAY
     aCTRL[FORM_CMB_MESSAGE   ] // Messagge related at the COMBO
     aCTRL[FORM_CMB_PFK       ] // Array of buttons added
     aCTRL[FORM_CMB_CONDITION ] // Condition related at COMBO
     aCTRL[FORM_CMB_ACTIVE    ] // Conditione of Activation
     aCTRL[FORM_CMB_CLRID     ] // Array of colors
     aCTRL[FORM_CMB_LISTBOX   ] // Listbox related at COMBO
     aCTRL[FORM_CMB_GAP       ] // Space between  combo and GET
     
     Example 2 :
     
     #include "DFCTRL.CH"
     
     ATTACH "CodCat" TO oWin:W_CONTROL GET CodCat
       AT   2,  1                     ; // Position
       PAGE  0                        ; // Page
       COLOR {"N/GR*","G+/GR*","N/N*","W+/BG"} ; // Colors
       PROMPT     "Categori^a"        ; // Prompt
       PROMPTAT     1 ,  1            ; // Coordinates
       PICTUREGET "XX"                ; // Picture in get
       PICTURESAY "XX"                ; // Picture in say
       CONDITION {|ab|CodCat(ab)}     ; // When/Valid
       SYSFUNCTION {||.T.}            ; // Function of sys
       MESSAGE "Categoria articolo"   ; // Messagge
       REFRESHID "Art"                ; // Group refresh
       COMBO                          ; // Icon combo
       ACTIVE   {||cState $ "am" }    ; // Active
       DISPLAYIF {||.T.}                // Condition


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