Defining the area section

The )AREA (scrollable area definition) section allows you to define scrollable areas on a panel. See Defining the attribute section for information about using the AREA(SCRL) keyword to specify that you want a scrollable area. You can see and interact with the total content defined for the panel area by scrolling the area.

Use the )AREA section header to describe the scrollable area.

Read syntax diagramSkip visual syntax diagram)AREAnameDEPTH( depth)
name
Specifies the name of the scrollable area that is to be matched with the name specified in the )BODY section. This name cannot be specified as a dialog variable.
DEPTH(depth)
Optional. Specifies the minimum number of lines in the scrollable area (not including the scroll indicator line) when EXTEND(ON) has been specified. DEPTH has no effect when EXTEND(OFF) is used. The top line is always reserved for the scroll information and is not considered part of the depth value. DEPTH can be used to ensure that a required number of lines are displayed. The depth value cannot be specified as a dialog variable. It must be greater than or equal to the number of lines defined for the area in the )BODY section and less than or equal to the number of lines in the )AREA definition.

A panel )AREA section defines the size and the contents of the information to be scrolled. The contents of the )AREA section generally follow the same rules as the )BODY section. See Panel definition considerations for rules concerning the definition of a scrollable area. Multiple scrollable areas can be defined. The name specified immediately following an AREA(SCRL) character in the )BODY section is used to match each scrollable area to its corresponding )AREA section. If the default EXTEND(OFF) is used, you designate the desired depth of the scrollable area by repeating the AREA(SCRL) attribute. If EXTEND(ON) is specified, the minimum depth is the DEPTH specified in the )AREA section.

The width of the scrollable area includes the special characters that designate the vertical sides. These delimiter characters do not represent attribute characters.

The scrollable area is identified in the panel source with a new attribute defined in the )ATTR section. This new attribute designates the borders of the scrollable area. For example:
)ATTR
  # AREA(SCRL) EXTEND(ON)
)BODY
#myarea---------#
#               #
#               #
#               #

A single character, Z, can be used in the )AREA section, just as it can be used in the )BODY section, as a place-holder for an input or output field. The actual name of the field is defined in the INIT section with the control variable .ZVARS. The actual field names are in a name list, with all the actual field names for the )BODY and )MODEL sections. The actual field names must appear in the name list in the order they appear in the panel definition, not in the order they will appear when the panel is displayed. The names must appear in the )BODY section, then )MODEL section, and then )AREA section order.

If you have defined several )AREA sections, the .ZVARS must be listed in order from top-to-bottom left-to-right as they appear in the panel definition.

Cursor position determines how an area scrolls. This is called cursor-dependent scrolling. If scroll down is requested, the line on which the cursor is placed is moved to the top line. If the cursor is currently on the top line of the scrollable area, the section is scrolled as total visible lines minus one. On a panel with only one scrollable area, if the cursor is not within the area and scrolling is requested, the area is scrolled by the total visible lines minus one. If scrolling an area causes the last line of an area to not be the last visible line in the area, the cursor is moved so that the last line of the area appears at the last visible line of the scrollable area.

The top line of the scrollable area is reserved for the scroll indicators. Actual information from the )AREA section is displayed beginning on the second line of the scrollable area. The scroll indicators are displayed only if more data was defined in the )AREA section than fits in the panel area.

The scroll indicators are displayed as follows:
More:     +
You can only scroll forward.
More:   -
You can only scroll backward.
More:   - +
You can scroll forward or backward.

Forward and backward function keys should be defined in the keylist for any application panel that has scrollable areas.

The )AREA section can contain any of the items that can be included in the )BODY section except for:
  • Action Bar lines
  • Graphics Area
  • Model Section
  • Command Line
  • Alternate Message Locations
  • Another scrollable area using AREA(SCRL)
  • Dynamic Area using EXTEND(ON) or SCROLL(ON).

The )AREA section must fit within the literal table limit of 64K.