8.1 Locating & Sizing Pop-up Windows

One of the most time consuming aspects of setting up a pop-up window is deciding upon the location and size of the window required.

If you follow these simple techniques, the amount of time involved can be significantly reduced.

 

     POP_UP FIELDS(#A #B #C #D) AT_LOC(5 22) WITH_SIZE(*AUTO)

   The WITH_SIZE(*AUTO) option tells LANSA to size the window to fill all the rest of the screen to the right of and below the AT_LOC row and column positions specified.

                                                              
                                                              
       row 5      ..........................................  
       col 22 ----> POP01         Pop-up demo              :  
                  :                                        :  
                  : Field A .... IIIIIIII Field B .... II  :  
                  : Field C .... IIIIIIIIIIIII             :  
                  : Field D .... III                       :  
                  :                                        :  
                  :                                        :  
                  :                                        :  
                  :                                        :  
                  :                                        :  
                  : Enter F15=Exit F12=Cancel F14=Msgs     :  
                  :                                        :  
                  :........................................:  

 

 

 


                                                              
                                                              
       row 5      ..........................................  
       col 22 ----> POP01         Pop-up demo              :  
                  :                                        :  
                  : Field A .... IIIIIIII Field B .... II  :  
                  : Field C .... IIIIIIIIIIIII             :  
                  : Field D .... III                       :  
                  :                                        :  
                  :                                        :  
                  :                                        :  
                  :                                        :  
                  :                                        :  
                  : Enter F15=Exit F12=Cancel F14=Msgs     :  
                  :                                        :  
                  :........................................:  

 

 

 

                                                              
                                                              
       row 5      ..........................................  
       col 22 ----> POP01         Pop-up demo              :  
                  :                                        :  
                  : Field A .... IIIIIIII                  :  
                  : Field B .... II                        :  
                  : Field C .... IIIIIIIIIIIII             :  
                  : Field D .... III                       :  
                  :                                        :  
                  :                                        :  
                  :                                        :  
                  :                                        :  
                  :  Enter F15=Exit F12=Cancel F14=Msgs    :   
                  :........................................:      

 

 

   Now before exiting from the screen painter, and aided by the "G" (screen grid) painter action, observe that relative to the upper left hand corner of the window you can reduce the window width by about 6 characters and its length by about 5 lines.

                  AT_LOC(05 22) WITH_SIZE(55 19)

   so you can quickly change them to be like this:

                  AT_LOC(05 22) WITH_SIZE(51 14)


                                                              
       row 5      ...............................             
       col 22 ----> POP01   Pop-up demo         :             
                  :                             :             
                  : Field A .... IIIIIIII       :             
                  : Field B .... II             :             
                  : Field C .... IIIIIIIIIIIII  :             
                  : Field D .... III            :             
                  :                             :             
                  : Enter F15=Exit F12=Cancel   :             
                  : F14=Msgs                    :             
                  :.............................: