Format 6
DISPLAY BOX draws a box on the screen.
DISPLAY BOX
[ UPON new-window ]
Remaining phrases are optional, can appear in any order.
AT screen-loc
AT LINE NUMBER line-num
AT {COLUMN } NUMBER col-num
{COL }
{POSITION}
{POS }
SIZE length
LINES height
{REVERSE-VIDEO}
{REVERSE }
{REVERSED }
WITH {COLOR } color-val
{COLOUR}
[TOP ] [CENTERED] TITLE IS title
[BOTTOM] [LEFT ]
[RIGHT ]
Syntax Rules
- Different formats of the DISPLAY statement may be mixed together in one DISPLAY statement, as long as no ambiguity results.
The effect is the same as specifying each DISPLAY statement separately.
- new-window is a USAGE HANDLE or PIC X(10) data item. If used, the UPON phrase must be the first optional phrase specified.
- screen-loc is an integer data item or literal containing exactly 4 or 6 digits. It may also be a group item of 4 or 6 characters. If
a numeric item is used, it must be a non-negative integer.
- line-num,
col-num,
length, and
height are numeric data items or literals. They may be non-integers, but only the integer value will be applied. You can also specify
the value of any of these items with an arithmetic expression.
- color-val is a numeric data item, literal, or arithmetic expression.
- Title is an alphanumeric literal or data item.
- If the UPON phrase is specified, it must be the first optional phrase.
- If the AT phrase is specified, neither the LINE nor the COLUMN phrase may be specified.
- The LINES phrase can take a numeric expression.
- IS and "=" are synonymous.
- COLUMN, COL, POSITION, and POS are equivalent.
- REVERSE-VIDEO, REVERSE, and REVERSED are equivalent.
- COLOR and COLOUR are synonymous.
General Rules
- The DISPLAY BOX verb provides the ability to draw a box in a machine- and terminal-independent manner. The best drawing mode
of the display device is used. If the lines used in drawing a box intersect other lines already present on the screen, the
appropriate intersection characters are used.
- DISPLAY BOX is an older, character-based technology. For fine control of boxes on graphical systems, use the FRAME control.
See Control Types Reference in User Interface Programming for more information.
- You specify the location of the box by providing the location of the upper-left corner. You specify the size of the box by
providing a height and a width.
AT, LINE, and COLUMN Phrases
The AT, LINE NUMBER, and COLUMN NUMBER phrases operate in the same manner as they do when they are used in a DISPLAY LINE
statement (Format 5).
SIZE and LINES Phrases
The SIZE phrase specifies the width of the box. The LINES phrase specifies its height. Length and height must specify values
greater than one. If the SIZE phrase is absent, the box will extend to the right edge of the current window. If the LINES
phrase is missing, the box will extend to the bottom of the current window.
COLOR and REVERSE Phrases
The COLOR and REVERSE phrases operate in the same manner as described in
Common Screen Options. Note that the COLOR value may not specify blinking, underlining, or an intensity (boxes are always drawn in a terminal-dependent
intensity).
TITLE Phrase
The TITLE phrase operates in the same manner as it does for a DISPLAY WINDOW verb (Format 3).