Z-99-EVENT-nomegrid

Navigation:  Documentazione SCREENS > Files generati > 'NOMEPRG'.PRC > Gestione griglie modificabili >

Z-99-EVENT-nomegrid

Previous pageReturn to chapter overviewNext page

Routine che gestisce gli eventi principali per una griglia modificabile.

Viene agganciato al componente "grid" nella screen section, ma viene anche richiamata in alcune procedure automatiche, soprattutto per scollegarla/ricollegarla alla griglia.

 

Esempio della routine

 

     **---------------------------------------------------------------**

     ** Gestione eventi per griglia: grid-det

     **---------------------------------------------------------------**

      z-99-event-grid-det.

          if last-row-grid-det > 1

             inquire e-grid-det, y in w-cell-y

             compute i-grid-color = last-row-grid-det - 1

             perform x-set-row-grid-det-color

             modify e-grid-det,

                y         = last-row-grid-det,

                row-color = row-grid-color

             modify e-grid-det, y = w-cell-y

          end-if

 

          if event-type = msg-goto-cell       or

             event-type = msg-goto-cell-mouse

             inquire e-grid-det, y in w-cell-y

           else

             inquire e-grid-det, cursor-y in w-cell-y

          end-if

          inquire e-grid-det, x in w-cell-x

          if w-cell-y not = 0 and

             w-cell-y not = 1

             compute i = w-cell-y - 1

          end-if

 

          if fl-sono-su-grid = 'S'

             if ext-riga-sel-griglie-mod = 'S' or

                fl-mod-grid-det <> 'S'

                modify e-grid-det, y = w-cell-y,

                   row-color = ext-color-grid-row-sel

             end-if

          end-if

 

          modify e-grid-det, event procedure null

          perform z-operazioni-acc-grid-det

          perform z-event-grid-det-ep

          perform z-gestione-tf-grid-det-auto

 

          evaluate event-type

           when msg-begin-entry

             if event-action = event-action-normal

                perform Z-nomegrid-BEGIN-ENTRY

             end-if

           when msg-finish-entry

             move 'S' to fl-validazione-post-accept

             perform z-grid-det-finish-entry

             move 'N' to fl-validazione-post-accept

           when msg-cancel-entry

             perform z-grid-det-cancel-entry

          end-evaluate

          perform z-event-grid-det-after

 

          modify e-grid-det, event procedure z-99-event-grid-det

 

          evaluate event-type

           when msg-col-width-changed

             perform x-grid-cambia-dimensione-colonna

          end-evaluate

 

          if w-cell-y > 1

             if ext-riga-sel-griglie-mod = 'S' or

                fl-mod-grid-det <> 'S'

                modify e-grid-det, y = w-cell-y,

                   row-color = ext-color-grid-row-sel

             end-if

          end-if

 

          move w-cell-y   to last-row-grid-det

          perform z-99-processa-event-grid-det

          .