6.3 Cursor Location in Output Only Pop-up Windows

When you write your first pop-up window program that is "output only" (ie: no input capable fields) you will probably get a result like this on your first attempt:

    ------------ Screen cursor goes to here when the "Companies"
   |             pop-up window appears.
   |

 
            DEMO01          Demonstration Panel                     
                                                                    
                                            ..........................
            Specify the following and press : COMP01  Companies      :
                                            :                        :
            Account number . . . . .        : Number Description     :
                                            :  01    ACME ENGINEERING:
            Account type . . . . . .        :  02    CONSOLIDATED ENG:
                                            :  03    ACME WELDING    :
            Company number . . . . .        :  04    DESIGN INC.     :
                                            :                        :
            Transaction amount . . .        :........................:

 

 

This is clearly unacceptable, because the user has to move the screen cursor right across the screen and into the "Companies" pop-up window to select the desired company.

The simplest solution to this problem is: code the POP_UP command like this:

           POP_UP ....whatever.... CURSOR_LOC(*ATFIELD #COMPNO)

which will cause the pop-up window to appear like this with the screen cursor under 0 in "01 ACME ENGINEERING":


          DEMO01          Demonstration Panel                          
                                                                       
                                           ........................... 
          Specify the following and press e: COMP01  Companies       : 
                                           :                         : 
          Account number . . . . .         : Number Description      : 
                                           :  01    ACME ENGINEERING : 
          Account type . . . . . .         :  02    CONSOLIDATED ENG : 
                                           :  03    ACME WELDING     : 
          Company number . . . . .         :  04    DESIGN INC.      : 
                                           :                         : 
          Transaction amount . . .         :.........................: