

       program-id. grid-sample.        working-storage section.        copy "iscrt.def".        copy "isgui.def".        77 MainWindow handle of window.        77 My-Combo-Box handle of combo-box occurs 10.        77 My-Check-Box handle of check-box occurs 10.        77 idx pic 9(2) value 0.        77 keystatus pic 9(5) special-names crt status.            88 esc value 27.        screen section.        01 Screen1.            03 My-Grid grid LINE 2, COL 2, SIZE 70 CELLS, LINES 5,               DISPLAY-COLUMNS (1, 11, 26, 46), NUM-ROWS 10,               hscroll vscroll               event procedure My-Grid-Event-Handler.        procedure division.        Main-Logic.            display standard graphical window background-low                  handle MainWindow            display Screen1            perform varying idx from 1 by 1 until idx > 10               display Check-Box                       handle My-Check-Box(idx)                       event check-evt                       upon My-Grid(idx, 1)               display Combo-Box lines 5                       handle My-Combo-Box(idx)                       ITEM-TO-ADD ("Item1", "Item2", "Item3",                                    "Item4", "Item5", "Item6")                       notify-selchange                       event combo-evt                       upon My-Grid(idx, 2)            end-perform            perform until esc               accept Screen1 on exception continue end-accept            end-perform            perform varying idx from 1 by 1 until idx > 10               destroy My-Check-Box(idx)               destroy My-Combo-Box(idx)            end-perform            stop run            .  | 
       My-Grid-Event-Handler.            display " grid event-type [" event-type "]"                    upon sysout            .        check-evt.            display " check-box event-type [" event-type "]"                    upon sysout            .        combo-evt.            display " combo-box event-type [" event-type "]"                    upon sysout            .  | 
           perform varying idx from 1 by 1 until idx > 10               display Check-Box                       handle My-Check-Box(idx)                       event check-evt                       upon My-Grid(idx, 1)               display Combo-Box lines 5                       handle My-Combo-Box(idx)                       ITEM-TO-ADD ("Item1", "Item2", "Item3",                                    "Item4", "Item5", "Item6")                       notify-selchange                       event combo-evt                       upon My-Grid(idx, 2)            end-perform  | 
              display Check-Box                       handle My-Check-Box(idx)                       event check-evt                       upon My-Grid(-1, 1)               display Combo-Box lines 5                       handle My-Combo-Box(idx)                       ITEM-TO-ADD ("Item1", "Item2", "Item3",                                    "Item4", "Item5", "Item6")                       notify-selchange                       event combo-evt                       upon My-Grid(-1, 2)  | 
       program-id. Grid1.        working-storage section.        copy "iscrt.def".        copy "isgui.def".        77  MainWindow      handle of window.        77  My-Combo-Box    handle of combo-box.        screen section.        01  Screen1.            03 My-Grid grid LINE 2, COL 2, SIZE 70 CELLS, LINES 5,               DISPLAY-COLUMNS (1, 11, 26, 46), NUM-ROWS 50,               event procedure My-Grid-Event-Handler.        procedure division.        Main-Logic.            display standard graphical window background-low                  handle MainWindow            display Screen1            perform until 1 = 2               accept Screen1 on exception continue end-accept            end-perform            stop run            .        My-Grid-Event-Handler.            evaluate event-type            when msg-begin-entry                 display Combo-Box lines 5                         handle My-Combo-Box                         ITEM-TO-ADD ("Item1", "Item2", "Item3",                                      "Item4", "Item5", "Item6")                         upon My-Grid(event-data-2, event-data-1)            when msg-finish-entry                 destroy My-Combo-Box            end-evaluate            .  | 
       program-id. GridCheck.        working-storage section.        copy "isgui.def".        copy "iscrt.def".        77  crt-status special-names crt status pic 9(5).        77  row pic 999.        01  rec.            03 c-1 pic 9   value 1.            03 c-2 pic xxx value "abc".        screen section.        01  screen1.            03 g grid line 2 col 2 lines 10, size 10 cells               display-columns (1, 3) virtual-width 9               data-columns (record-position of c-1,                              record-position of c-2)                       .        procedure division.        main.            display standard graphical window.            display screen1.            display check-box upon g(-1, 1)                    self-act, exception-value 100.            modify g record-to-add rec.            modify g record-to-add rec.            perform until exit              accept screen1 exception crt-status continue end-accept              if crt-status = 100                 inquire g cursor-y row                 display "click on check-box in grid" upon sysout              end-if            end-perform.                        goback.  |