SCREEN section
The SCREEN
section defines the form layout for TUI mode forms.
Syntax
SCREEN
[ SIZE lines [ BY chars ] ]
[ TITLE "title" ]
[ TAG "tag-string" ]
{
{ text | [ item-tag [ | item-tag ] [...] ] }
[...]
}
[END]
- lines is the number of characters the form can display vertically. The default is 24.
- chars is the number of characters the form can display horizontally. The default is the maximum number of characters in any line of the screen definition.
- title is the title for the top window.
- tag-string is a user-defined string.
- item-tag and text define form elements in the layout.
Usage
The SCREEN
section must be used to design TUI mode
screens. For a GUI mode application, use a LAYOUT
or STACKED
LAYOUT
section instead.
The SCREEN
section must appear in
the sequence described in form file
structure.
The SCREEN
section is mandatory, unless you use a LAYOUT
section.
The END
keyword is
optional.
The SIZE lines [ BY chars ]
clause is
supported for backward compatibility. A good practice is to omit this clause, and let the form
compiler compute the size of the form, based on the content of the curly brackets.
The TAG
attribute can be used to specify a string that will help to identify the
form at runtime. For more details about this attribute, see TAG
.
Inside the SCREEN
section, you can define the position
of text labels and form fields in the area delimited by the {}
curly
brackets.
Between the curly brackets, horizontal lines can be specified with a sequence of dash characters
(-----
).
\g
to start and end graphics mode. For example, \g|\g
defines a
vertical segment. The following characters can be used to indicate the borders of rectangles:p
upper-left corner.q
upper-right corner.b
left-lower corner.d
left-right corner.-
(hyphen) to mark horizontal segments.|
(pipe) to mark vertical segments.
Example
SCREEN TITLE "Customer info" TAG "regular"
{
CustId : [f001 ] Name: [f002 ]
Address: [f003 ]
[f003 ]
------------------------------------------------
}
END