Please enable JavaScript to view this site.

ESL Documentation

You can change the position of the window of a textual region, or of all the textual region windows in a class, with the change window position action statement. This is the same statement used to change the window position of a graphical region; the only difference is that you must specify columns and lines rather than X Y coordinates.

 

The change window position by statement changes the relative position of the window by the values specified. For a textual region, the values are specified in positive or negative integer values representing the number of columns and lines; for example:

 

response to ...

    change Notepad window position by 30 columns 5 lines

 

If Notepad's window position had been at column 40, line 20, it will be at column 70, line 25 after this statement is executed.

 

The change window position to statement changes the absolute position of the window with positive integer values representing the number of columns and lines. These represent the new position of the window within the textual region's coordinate system, which is the upper left corner of the window; for example:

 

response to ...

    change Notepad window position to column 30 line 50

 

No matter where Box's window was positioned, it will be at column 30, line 50 after this statement is executed. When the window has moved, the specified column and line number are at the upper left corner of the window.

 

The change window position by and change window position to statements are often used for scrolling through a textual region. Suppose only a portion of the contents of the textual region is visible in its window. You will want the user to be able to select an up arrow key to view the contents that are above the top of the window, and to select a down arrow key to view the contents that are below the bottom of the window. For example:

 

response to UpArrow

    change DataArea window position by 0 -10

 

response to DownArrow

    change DataArea window position by 0 10

 

The change window position to statement moves the window so that the specified column and line number are at the upper left corner of the window. The change window position by statement moves the window the specified number of columns and lines. A positive value for columns and lines scrolls the window right and down, respectively; a negative value for columns and lines scrolls the window left and up, respectively.

 

Note that the X coordinate in change window position does not work for list boxes and combination boxes.