     H BNDDIR('LRNGSRV') DFTACTGRP(*no) ACTGRP(*caller)
     FEXAM9999D CF   E             WORKSTN
     D* Prototype for generic cell builder MakeCell
     D MakeCell        Pr
     D  Row                          10I00 Const
     D  Col                          10I00 Const
     D  RowHeight                    20A   Varying Const
     D  ColWidth                     20A   Varying Const
     D  BackColor                    20A   Varying Const
     D  Color                        20A   Varying Const
     D  Text                        256A   Varying Const
     D  RowSpan                      10I00 Const
     D  ColSpan                      10I00 Const
      * Standard include to bring in the external LRNG support functions
      /INCLUDE LRNGSOURCE,LRNGCOMMON
      * Standard demonstration definitions and prototypes
      /INCLUDE SOURCEDEMO,DEMOCOMMON
      * Standard form view handler parameter list declaration
      /INCLUDE SOURCEDEMO,STDPARAMS
      * Use free format coding style
      /free

        // Create the 3 elements

        //       Row Col  Height  Width  Backcolor TextColor Text    RowSp ColSp
        MakeCell (1 : 1 : '5%'  : 'Fill' :'Red'  : 'White' : 'Top'   : 0 : -1);

        MakeCell (2 : 1 : 'Fill' : '50%' :'Blue' : 'White' : 'Left'  : 0 :  0);

        MakeCell (2 : 2 : 'Fill' : '50%' :'Green': 'White' : 'Right' : 0 :  0);


         // Send and receive the screen
         LRNG_Send();
         EXFMT FORMVIEW;
         LRNG_Receive();
         LRNG_GetRequestedAction(RequestPROGRAM:RequestACTION);
         // Finished
         *InLR = True;
         Return;


      /end-free

      * ====================================================================
      * MakeCell - Make a cell on the screen
      * ====================================================================
     P MakeCell        B
     D MakeCell        Pi
     D  Row                          10I00 Const
     D  Col                          10I00 Const
     D  RowHeight                    20A   Varying Const
     D  ColWidth                     20A   Varying Const
     D  BackColor                    20A   Varying Const
     D  Color                        20A   Varying Const
     D  Text                        256A   Varying Const
     D  RowSpan                      10I00 Const
     D  ColSpan                      10I00 Const
     D* ************************************************************
     D Local           DS
      /free
        LRNG_Using('/Form.Fields.L'+%char(Row)+%char(Col));
        LRNG_SetProperty('Type':'Label');
        LRNG_SetProperty('Text':Text);
        LRNG_SetNumProperty('Layout.Row':Row);
        LRNG_SetNumProperty('Layout.Col':Col);
        LRNG_SetProperty('TextAlign':'Center');
        LRNG_SetProperty('VAlign':'Middle');
        if (RowSpan <> 0);
          LRNG_SetProperty('Layout.Rows':%char(RowSpan));
        Endif;
        if (ColSpan <> 0);
          LRNG_SetProperty('Layout.Cols':%char(ColSpan));
        Endif;
        LRNG_SetProperty('Color' : Color);
        LRNG_SetProperty('BackColor' : BackColor);
        LRNG_EndUsing();
        LRNG_Using('/Form.Grid');
        if (RowHeight <> '');
          LRNG_SetProperty('Row%'+%char(Row)+'.Height':RowHeight);
        Endif;
        if (ColWidth <> '');
          LRNG_SetProperty('Col%'+%char(Col)+'.Width':ColWidth);
        Endif;
        LRNG_EndUsing();
        Return;
      /end-free
     P MakeCell        E 