Please enable JavaScript to view this site.

ESL Documentation

The size of the textual region's viewport is defined in X Y coordinates with the size specification, or is defined in lines and columns with the window size specification. You cannot define both. For textual regions, the size of both the viewport and the window is determined by using one of these specifications.

 

As noted in Chapter 2, the viewport of a textual region lies in the coordinate system of the parent of the textual region. Because the parent of the textual region must be a graphical object, the viewport size must be specified in X Y coordinates. For example, the following statement defines a textual region's size, which is also the viewport's size, in X Y coordinates:

 

textual region WriterHere size 50 200 at position 0 50

 

With the size specification, the size of the window is inferred. That is, the number of columns in the window is set to the largest number that a viewport of this size can display horizontally, and the number of lines in the window is set to the largest number that a viewport of this size can display vertically, based upon the textual region's font.

 

If you use the window size specification to define the size of the textual region, its size must be specified in columns and lines, since the window lies in the coordinate system of the textual region. For example, the following statement defines the size in columns and lines:

 

textual region News window size 60 columns 35 lines

    at position 0 50

 

With the window size specification, the size of the viewport is made to be the height and width necessary to display the complete window in the textual region's font.

 

When you use window size, the actual space that the textual region takes up on the screen (in X Y coordinates) is based on the specified number of columns and lines and the size of the font.

 

For example, in any given viewport you can fit more columns and lines of text displayed in ESL's medium font than in ESL's large font. If you use window size to define the size of the textual region, it will not matter what font you use - the displayed area will always be the number of columns and lines specified. Thus, it is recommended that you define all textual regions with window size, unless the textual region must occupy a specific area proportional to other objects on the monitor.