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 - /* +----------------------------------------------------------------------+ http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
/* +----------------------------------------------------------------------+
   |                                                                      |
   |            (C) 1989 - 1998 by ISA Italian Software Agency            |
   |                                                                      |
   |                               CONTROL                                |
   |                                                                      |
   +----------------------------------------------------------------------+ */

#include "dfWin.ch"

#ifndef _DFCTRL_CH
   #define _DFCTRL_CH

   // Control type

   #define CTRL_SAY          1     // SAY
   #define CTRL_BOX          2     // BOX
   #define CTRL_FUNCTION     3     // FUNCTION
   #define CTRL_GET          4     // GET
   #define CTRL_CMB          5     // COMBOBOX
   #define CTRL_TEXT         6     // TEXTBOX
   #define CTRL_CHECK        7     // CHECKBOX
   #define CTRL_RADIO        8     // RADIOBUTTON
   #define CTRL_BUTTON       9     // PUSHBUTTON
   #define CTRL_LISTBOX     10     // LISTBOX
   #define CTRL_SPIN        11     // SPINBUTTON

   // Position in all the control
                                   //                         DEFAULT
   #define FORM_CTRL_TYP       1   // Control TYPE
   #define FORM_CTRL_ID        2   //         ID
   #define FORM_CTRL_RID       3   //         REFRESH ID        ""
   #define FORM_CTRL_PAGE      4   //         PAGE               1
   #define FORM_CTRL_STABLE    5   //         STABLE            .F.
   #define FORM_CTRL_DISPLAYIF 6   //         DISPLAY IF      {||.T.}

                         /*-----------------*/

   #COMMAND ATTACH <cId> TO <aParent> SAY <uVar>   ;
                                AT  <nRow>, <nCol> ;
                                [PAGE    <nPage>]  ;
                                [COLOR   <aCol>]   ;
                                [DISPLAYIF <uDiIf>];
                                [REFRESHID <cRID>] ;
                                                   ;
         => aAdd( <aParent>, { CTRL_SAY ,;
                               <cId>, <cRID>, <nPage>, .F., <{uDiIf}>,;
                               <uVar>, <nRow>, <nCol>,;
                               <aCol> } )

                                          //                 DEFAULT
   #define FORM_SAY_VAR        7          // Var
   #define FORM_SAY_ROW        8          // Row
   #define FORM_SAY_COL        9          // Col
   #define FORM_SAY_CLRID     10          // COLOR ARRAY
      #define FORM_SAY_CLRTEXT    10][1   //       TEXT
      #define FORM_SAY_CLRNULL    10][2   //       NULL

                         /*-----------------*/

   #COMMAND ATTACH <cId> TO <aParent> BOX <nType>   ;
                                AT  <nTop>, <nLeft>, <nBottom>, <nRight>;
                                [PAGE    <nPage>]  ;
                                [COLOR   <aCol>]   ;
                                [FILL <cFill>]     ;
                                [DISPLAYIF <uDiIf>];
                                [REFRESHID <cRID>] ;
                                                   ;
         => aAdd( <aParent>, { CTRL_BOX ,;
                               <cId>, <cRID>, <nPage>, .F., <{uDiIf}>,;
                               <nType>, <nTop>, <nLeft>, <nBottom>, <nRight> ,;
                               <aCol>, <cFill> })

                                            //                     DEFAULT
   #define FORM_BOX_TYPE       7            // Type                   1
   #define FORM_BOX_TOP        8            // Top
   #define FORM_BOX_LEFT       9            // Left
   #define FORM_BOX_BOTTOM    10            // Bottom
   #define FORM_BOX_RIGHT     11            // Right
   #define FORM_BOX_CLRID     12            // COLOR ARRAY
      #define FORM_BOX_CLRTOPLEFT     12][1 //       TOP LEFT
      #define FORM_BOX_CLRFILLER      12][2 //       FILLER
      #define FORM_BOX_CLRBOTTOMRIGHT 12][3 //       BOTTOM RIGHT
      #define FORM_BOX_CLRNULL        12][4 //       NULL
   #define FORM_BOX_FILL      13            // Filler                ""

                         /*-----------------*/

   #COMMAND ATTACH <cId> TO <aParent> FUNCTION <uVar>    ;
                                      AT  <nTop>, <nLeft>, <nBottom>, <nRight> ;
                                      [PAGE    <nPage>]  ;
                                      [PICTURESAY <cPicSay>];
                                      [PROMPT  <cPrompt>] ;
                                      [PROMPTAT <nPRow>, <nPCol>] ;
                                      [BOX       <nBox>] ;
                                      [COLOR   <aCol>]   ;
                                      [DISPLAYIF <uDiIf>];
                                      [<Rti:REALTIME>]   ;
                                      [BEFORE  <uBefore>];
                                      [COMPUTEDEXP <uCmpExp>];
                                      [COMPUTEDGRP <uCmpGrp>];
                                      [REFRESHID <cRID>] ;
                                                         ;
         => aAdd( <aParent>, { CTRL_FUNCTION ,;
                               <cId>, <cRID>, <nPage>, .F., <{uDiIf}>,;
                               <{uVar}>, <nTop>, <nLeft>     ,;
                               <nBottom>, <nRight>, <cPicSay>,;
                               <cPrompt>, <nPRow>, <nPCol>, <nBox>,;
                               <aCol>, <{uBefore}>, <.Rti.>,;
                               <{uCmpExp}>, <uCmpGrp>,"" , , })

                                             //                    DEFAULT
   #define FORM_FUN_VAR        7             // Var
   #define FORM_FUN_TOP        8             // Top
   #define FORM_FUN_LEFT       9             // Left
   #define FORM_FUN_BOTTOM    10             // Bottom
   #define FORM_FUN_RIGHT     11             // Right
   #define FORM_FUN_PICTURE   12             // Picture              ""
   #define FORM_FUN_PROMPT    13             // Prompt
   #define FORM_FUN_PROW      14             // Prompt row
   #define FORM_FUN_PCOL      15             // Prompt col
   #define FORM_FUN_BOX       16             // Box                  0
   #define FORM_FUN_CLRID     17             // COLOR ARRAY
      #define FORM_FUN_CLRPROMPT      17][1  //       PROMPT
      #define FORM_FUN_CLRHOTKEY      17][2  //       HOT KEY
      #define FORM_FUN_CLRDATA        17][3  //       DATA
      #define FORM_FUN_CLRTOPLEFT     17][4  //       TOP LEFT
      #define FORM_FUN_CLRBOTTOMRIGHT 17][5  //       BOTTOM RIGHT
      #define FORM_FUN_CLRNULL        17][6  //       NULL
   #define FORM_FUN_BEFORE    18             // Before             {||.T.}
   #define FORM_FUN_REALTIME  19             // RealTime             .F.
   #define FORM_FUN_COMPEXP   20             // Computed exp       {||.T.}
   #define FORM_FUN_COMPGRP   21             // Computed group
   #define FORM_FUN_COMPREF   22             // Computed refresh
   #define FORM_FUN_ROW       23             // Memo Row
   #define FORM_FUN_COL       24             // Memo Col

                         /*-----------------*/

   #COMMAND ATTACH <cId> TO <aParent> GET <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>];
                                      [COMPUTEDEXP <uCmpExp>];
                                      [COMPUTEDGRP <uCmpGrp>];
                                      [<Cmb:COMBO>]       ;
                                      [GAP         <nGap>];
                                      [MESSAGE <cMes>]    ;
                                      [PFK <aPfk>]        ;
                                      [VARNAME <cVarName>];
                                      [ACT <cAct>]        ;
                                      [COLOR   <aCol>]    ;
                                      [REFRESHID <cRID>]  ;
                                                          ;
     => aAdd( <aParent>, { CTRL_GET ,;
                               <cId>, <cRID>, <nPage>, .F., <{uDiIf}>,;
                         {|uVal|IF(uVal==NIL, <uVar>, <uVar>:=uVal)},;
                         <nRow>, <nCol>,;
                         <cPrompt>, <nPRow>, <nPCol>,;
                         <cPicGet>, <cPicSay>,;
                         <cMes>, <aPfk>, <cVarName>, <uCond>,;
                         <{uActive}>,;
                         <aCol>, <{uSys}>, <.Cmb.>,;
                         <nGap>, <cAct>, <uGrp>, <{uCmpExp}>, <uCmpGrp>, ""})

                                             //                      DEFAULT
   #define FORM_GET_VAR         7            // Var
   #define FORM_GET_ROW         8            // Row
   #define FORM_GET_COL         9            // Col
   #define FORM_GET_PROMPT     10            // Prompt                  ""
   #define FORM_GET_PROW       11            // Prompt Row
   #define FORM_GET_PCOL       12            // Prompt Col
   #define FORM_GET_PICTUREGET 13            // Picture GET           PICSAY
   #define FORM_GET_PICTURESAY 14            // Picture SAY           PICGET
   #define FORM_GET_MESSAGE    15            // Message                 ""
   #define FORM_GET_PFK        16            // PFK Array               {}
   #define FORM_GET_CVAR       17            // Var Name
   #define FORM_GET_CONDITION  18            // Condition             {||.T.}
   #define FORM_GET_ACTIVE     19            // Active                {||.T.}
   #define FORM_GET_CLRID      20            // COLOR ARRAY
      #define FORM_GET_CLRPROMPT  20][1      //       PROMPT
      #define FORM_GET_CLRHOTKEY  20][2      //       HOT KEY
      #define FORM_GET_CLRDATA    20][3      //       DATA
      #define FORM_GET_CLRHILITE  20][4      //       DATA HILITE
      #define FORM_GET_CLRICON    20][5      //       ICON
      #define FORM_GET_CLRNULL    20][6      //       NULL
   #define FORM_GET_SYS        21            // Function SYS          {||NIL}
   #define FORM_GET_COMBO      22            // Combo
   #define FORM_GET_GAP        23            // Combo GAP
   #define FORM_GET_ACT        24            // Exit ACTION
   #define FORM_GET_CTRLGRP    25            // Refresh GRP             ""
   #define FORM_GET_COMPEXP    26            // Computed Exp          {||.T.}
   #define FORM_GET_COMPGRP    27            // Computed Group
   #define FORM_GET_COMPREF    28            // Computed Refresh

                         /*-----------------*/

   #COMMAND 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 <bChk>]  ;
                                      [REFRESHID <cRID>]  ;
                                                          ;
     => aAdd( <aParent>, { CTRL_CMB ,;
                               <cId>, <cRID>, <nPage>, .F., <{uDiIf}>,;
                         {|uVal|IF(uVal==NIL, <uVar>, <uVar>:=uVal)},;
                         <nRow>, <nCol>, ;
                         <cPrompt>, <nPRow>, <nPCol>,;
                         <cPicGet>, <cPicSay>,;
                         <cMes>, <aPfk>, <cVarName>, <{uCond}>,;
                         <{uActive}>,;
                         <aCol>, <{uSys}>, <oList>,;
                         <nGap>, <cAct>, <uGrp>, <{bChk}> })

                                             //                      DEFAULT
   #define FORM_CMB_VAR         7            // Var
   #define FORM_CMB_ROW         8            // Row
   #define FORM_CMB_COL         9            // Col
   #define FORM_CMB_PROMPT     10            // Prompt                  ""
   #define FORM_CMB_PROW       11            // Prompt Row
   #define FORM_CMB_PCOL       12            // Prompt Col
   #define FORM_CMB_PICTUREGET 13            // Picture GET           PICSAY
   #define FORM_CMB_PICTURESAY 14            // Picture SAY           PICGET
   #define FORM_CMB_MESSAGE    15            // Message                 ""
   #define FORM_CMB_PFK        16            // PFK Array               {}
   #define FORM_CMB_CVAR       17            // Var Name
   #define FORM_CMB_CONDITION  18            // Condition             {||.T.}
   #define FORM_CMB_ACTIVE     19            // Active                {||.T.}
   #define FORM_CMB_CLRID      20            // COLOR ARRAY
      #define FORM_CMB_CLRPROMPT  20][1      //       PROMPT
      #define FORM_CMB_CLRHOTKEY  20][2      //       HOT KEY
      #define FORM_CMB_CLRDATA    20][3      //       DATA
      #define FORM_CMB_CLRHILITE  20][4      //       DATA HILITE
      #define FORM_CMB_CLRICON    20][5      //       ICON
      #define FORM_CMB_CLRNULL    20][6      //       NULL
   #define FORM_CMB_SYS        21            // Function SYS          {||NIL}
   #define FORM_CMB_LISTBOX    22            // LISTBOX
   #define FORM_CMB_GAP        23            // Combo GAP
   #define FORM_CMB_ACT        24            // Exit ACTION
   #define FORM_CMB_CTRLGRP    25            // Refresh GRP             ""
   #define FORM_CMB_DATACHECK  26            // Data Check

                         /*-----------------*/

   #COMMAND ATTACH <cId> TO <aParent> GET AS TEXTFIELD <uVar> ;
                                      AT  <nTop>, <nLeft>, <nBottom>, <nRight>;
                                      [CONDITION <uCond>];
                                      [ACTIVE <uActive>]   ;
                                      [PAGE    <nPage>]  ;
                                      [PROMPT  <cPrompt>];
                                      [BOX       <nBox>] ;
                                      [DISPLAYIF <uDiIf>];
                                      [<Ink:NOINKEY>]    ;
                                      [SYSFUNCTION <uSys>];
                                      [MESSAGE    <cMes>];
                                      [VARNAME <cVarName>];
                                      [COLOR   <aCol>]   ;
                                      [PFK <aPfk>]       ;
                                      [REFRESHID <cRID>] ;
                                      [MEMOWIDTH <nLen>] ;
                                                         ;
         => aAdd( <aParent>, { CTRL_TEXT ,;
                               <cId>, <cRID>, <nPage>, .F., <{uDiIf}>,;
                             {|uVal|IF(uVal==NIL, <uVar>, <uVar>:=uVal)},;
                             <nTop>, <nLeft>, <nBottom>, <nRight>,;
                             <cPrompt>, <nBox>, <{uCond}>,;
                             <{uActive}>,;
                             <.Ink.>, <uSys>, <cMes>,;
                             <cVarName>, <aCol>, <aPfk>,,,<nLen>})

                                              //                   DEFAULT
   #define FORM_TXT_VAR        7              // Var
   #define FORM_TXT_TOP        8              // Top
   #define FORM_TXT_LEFT       9              // Left
   #define FORM_TXT_BOTTOM    10              // Bottom
   #define FORM_TXT_RIGHT     11              // Right
   #define FORM_TXT_PROMPT    12              // Prompt              ""
   #define FORM_TXT_BOX       13              // Box                  0
   #define FORM_TXT_CONDITION 14              // Condition          {||.T.}
   #define FORM_TXT_ACTIVE    15              // Active             {||.T.}
   #define FORM_TXT_NOINKEY   16              // No Inkey
   #define FORM_TXT_SYS       17              // SYS Function
   #define FORM_TXT_MESSAGE   18              // Message             ""
   #define FORM_TXT_CVAR      19              // Var Name
   #define FORM_TXT_CLRID     20              // COLOR ARRAY
      #define FORM_TXT_CLRPROMPT       20][1  //       PROMPT
      #define FORM_TXT_CLRHOTKEY       20][2  //       HOT KEY
      #define FORM_TXT_CLRDATA         20][3  //       DATA
      #define FORM_TXT_CLRHILITE       20][4  //       DATA HILITE
      #define FORM_TXT_CLRTOPLEFT      20][5  //       TOP LEFT
      #define FORM_TXT_CLRBOTTOMRIGHT  20][6  //       BOTTOM RIGHT
      #define FORM_TXT_CLRNULL         20][7  //       NULL
   #define FORM_TXT_PFK       21              // PFK Array
   #define FORM_TXT_ROW       22              // Memo view row
   #define FORM_TXT_COL       23              // Memo view col
   #define FORM_TXT_MEMOLEN   24              // Memo line LENGHT

                         /*-----------------*/

   #COMMAND 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>];
                                                         ;
         => aAdd( <aParent>, { CTRL_CHECK ,;
                               <cId>, <cRID>, <nPage>, .F., <{uDiIf}>,;
                             <uGrp> ,;
                             {|uVal|IF(uVal==NIL, <uVar>, <uVar>:=uVal)},;
                             <cPrompt>, <nRow>, <nCol>,;
                             <{uActive}>,;
                             <aCol>, <cMes>, <nGap>, <{bClick}>, <cVarName>,;
                             <uValOn>, <uValOff> })

                                              //                     DEFAULT
   #define FORM_CHK_CTRLGRP    7              // Refresh GRP
   #define FORM_CHK_VAR        8              // Var
   #define FORM_CHK_PROMPT     9              // Prompt                ""
   #define FORM_CHK_ROW       10              // Row
   #define FORM_CHK_COL       11              // Col
   #define FORM_CHK_ACTIVE    12              // Active              {||.T.}
   #define FORM_CHK_CLRID     13              // COLOR ARRAY
      #define FORM_CHK_CLRPROMPT        13][1 //       PROMPT
      #define FORM_CHK_CLRHOTKEY        13][2 //       HOTKEY
      #define FORM_CHK_CLRHILITEPROMPT  13][3 //       HILITE PROMPT
      #define FORM_CHK_CLRICON          13][4 //       ICON COLOR
      #define FORM_CHK_CLRNULL          13][5 //       NULL
   #define FORM_CHK_MESSAGE   14              // Message
   #define FORM_CHK_GAP       15              // Gap                   0
   #define FORM_CHK_CLICKED   16              // When Clicked        {||.T.}
   #define FORM_CHK_CVAR      17              // Var Name
   #define FORM_CHK_VALUEON   18              // Value ON
   #define FORM_CHK_VALUEOFF  19              // Value OFF

                         /*-----------------*/

   #COMMAND 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>];
                                                   ;
         => aAdd( <aParent>, { CTRL_RADIO ,;
                               <cId>, <cRID>, <nPage>, .F., <{uDiIf}>,;
                               <uGrp> ,;
                               {|uVal|IF(uVal==NIL, <uVar>, <uVar>:=uVal)},;
                               <cPrompt>, <nRow>, <nCol>,;
                               <{uActive}>,;
                               <aCol>,  <cMes>,;
                               <nGap>, <{bClick}>, <cVarName>, <{uVal}> })

                                              //                     DEFAULT
   #define FORM_RAD_CTRLGRP    7              // Refresh GRP
   #define FORM_RAD_VAR        8              // Var
   #define FORM_RAD_PROMPT     9              // Prompt
   #define FORM_RAD_ROW       10              // Row
   #define FORM_RAD_COL       11              // Col
   #define FORM_RAD_ACTIVE    12              // Active              {||.T.}
   #define FORM_RAD_CLRID     13              // COLOR ARRAY
      #define FORM_RAD_CLRPROMPT        13][1 //       PROMPT
      #define FORM_RAD_CLRHOTKEY        13][2 //       HOTKEY
      #define FORM_RAD_CLRHILITEPROMPT  13][3 //       HILITE PROMPT
      #define FORM_RAD_CLRICON          13][4 //       ICON COLOR
      #define FORM_RAD_CLRNULL          13][5 //       NULL
   #define FORM_RAD_MESSAGE   14              // Message
   #define FORM_RAD_GAP       15              // Gap                   0
   #define FORM_RAD_CLICKED   16              // When Clicked        {||.T.}
   #define FORM_RAD_CVAR      17              // Var Name
   #define FORM_RAD_VALUE     18              // Value

                         /*-----------------*/

   #COMMAND ATTACH <cId> TO <aParent> GET AS PUSHBUTTON <cPrompt>;
                                      AT  <nTop>, <nLeft>, <nBottom>, <nRight>;
                                      [PAGE    <nPage>]    ;
                                      [FUNCTION <uFun>]    ;
                                      [COLOR   <aCol>]     ;
                                      [ACTIVE <uActive>]   ;
                                      [REFRESHID <cRID>]   ;
                                      [MESSAGE <cMes>]     ;
                                      [<Pack:PACK>]        ;
                                                           ;
      => aAdd( <aParent>, { CTRL_BUTTON ,;
                            <cId>, <cRID>, <nPage>, .F.,  NIL     ,;
                            <cPrompt>, <nTop>, <nLeft>, <nBottom>, <nRight>,;
                            <aCol>, <{uActive}>, <{uFun}>, <cMes>, <.Pack.> })

                                                //                    DEFAULT
   #define FORM_BUT_PROMPT    7                 // Prompt
   #define FORM_BUT_TOP       8                 // Top
   #define FORM_BUT_LEFT      9                 // Left
   #define FORM_BUT_BOTTOM   10                 // Bottom
   #define FORM_BUT_RIGHT    11                 // Right
   #define FORM_BUT_CLRID    12                 // COLOR ARRAY
      #define FORM_BUT_CLRTOPLEFT        12][1  //       TOP LEFT
      #define FORM_BUT_CLRPROMPT         12][2  //       PROMPT
      #define FORM_BUT_CLRHOTKEY         12][3  //       HOT KEY
      #define FORM_BUT_CLRBOTTOMRIGHT    12][4  //       BOTTOM RIGHT
      #define FORM_BUT_CLRHILITEPROMPT   12][5  //       PROMPT HILITE
      #define FORM_BUT_CLRHILITEHOTKEY   12][6  //       HOTKEY HILITE
      #define FORM_BUT_CLRNULL           12][7  //       NULL
      #define FORM_BUT_CLRDISABLEDPROMPT 12][8  //       NULL
      #define FORM_BUT_CLRDISABLEDHOTKEY 12][9  //       NULL
   #define FORM_BUT_ACTIVE   13                 // Active             {||.T.}
   #define FORM_BUT_FUNCTION 14                 // Function           {||.T.}
   #define FORM_BUT_MESSAGE  15                 // Message              ""
   #define FORM_BUT_PACK     16                 // Packed

                         /*-----------------*/

   #COMMAND ATTACH <cId> TO <aParent> GET AS LISTBOX USING <oList>;
                                      [PAGE    <nPage>]  ;
                                      [ACTIVE <uActive>]   ;
                                      [REFRESHID <cRID>]   ;
                                                     ;
         => aAdd( <aParent>, { CTRL_LISTBOX ,;
                            <cId>, <cRID>, <nPage>, .F.,  NIL     ,;
                               <oList>, <{uActive}>, })

   #define FORM_LIST_OBJECT    7
   #define FORM_LIST_ACTIVE    8
   #define FORM_LIST_CLRNULL   9

                         /*-----------------*/

   #COMMAND 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>];
                                                            ;
     => aAdd( <aParent>, { CTRL_SPIN ,;
                               <cId>, <cRID>, <nPage>, .F., <{uDiIf}>,;
                         {|uVal|IF(uVal==NIL, <uVar>, <uVar>:=uVal)},;
                         <nRow>, <nCol>, ;
                         <cPrompt>, <nPRow>, <nPCol>,;
                         <cPicSay>, <cMes>, <cVarName>,;
                         <{uActive}>,;
                         <aCol>, <nGap>,;
                         <uGrp>, <aSource>, <nMin>, <nMax>, <nStep>,;
                         <{bClick}> })

                                              //                     DEFAULT
   #define FORM_SPN_VAR         7             // Var
   #define FORM_SPN_ROW         8             // Row
   #define FORM_SPN_COL         9             // Col
   #define FORM_SPN_PROMPT     10             // Prompt                ""
   #define FORM_SPN_PROW       11             // Prompt Row
   #define FORM_SPN_PCOL       12             // Prompt Col
   #define FORM_SPN_PICTURESAY 13             // Picture Say           ""
   #define FORM_SPN_MESSAGE    14             // Message
   #define FORM_SPN_CVAR       15             // Var Name
   #define FORM_SPN_ACTIVE     16             // Active
   #define FORM_SPN_CLRID      17             // COLOR ARRAY
      #define FORM_SPN_CLRPROMPT  17][1       //       PROMPT
      #define FORM_SPN_CLRHOTKEY  17][2       //       HOTKEY
      #define FORM_SPN_CLRDATA    17][3       //       DATA
      #define FORM_SPN_CLRHILITE  17][4       //       DATA HILITE
      #define FORM_SPN_CLRICON    17][5       //       ICON
      #define FORM_SPN_CLRNULL    17][6       //       NULL
   #define FORM_SPN_GAP        18             // Gap                    0
   #define FORM_SPN_CTRLGRP    19             // Refresh GRP            ""
   #define FORM_SPN_ARRAY      20             // Array
   #define FORM_SPN_MIN        21             // Min
   #define FORM_SPN_MAX        22             // Max
   #define FORM_SPN_STEP       23             // Step
   #define FORM_SPN_CLICKED    24             // When Clicked        {||.T.}


   // Normal GET CONDITION CALL

   #define FORM_PREGET   1
   #define FORM_POSTGET  2
   #define FORM_CHKGET   3


   // GET CARGO Structure

   #define G_ACTION     CARGO[1]
   #define G_FUNCTION   CARGO[2]

   #define G_LEN              2


   // BOX Type

   #define BOX_NORMAL  1
   #define BOX_BUTTON  2
   #define BOX_FILL    3

#endif

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