Usage
An item tag is delimited by square
braces ([]) or pipes (|) and
contains an identifier used to reference the description
of the form item in the ATTRIBUTES section.
Each
item tag must be indicated by left and right delimiters to show the
length of the item and its position within the container
layout. Both delimiters must appear on the same line.
You must use left and right braces (
[]) to delimit
item tags. The number of characters and the delimiters
define the width of the region to be used by the
item:
GRID
{
Name: [f001 ]
}
END
The form item position starts after the open
square brace and the length is defined by the number
of characters between the square braces. The following example
defines a form item starting at position 3, with a
length of 2:
GRID
{
1234567890
[f1]
}
END
By default, the real width of the form item
is defined by the number of characters used between
the tag delimiters.
For some special items like
BUTTONEDIT,
COMBOBOX
and
DATEEDIT, the width of the field
is adjusted to include the button. The form compiler
computes the width as:
width=
nbchars-2 if
nbchars>2:
GRID
{
1234567
[f1 ] -- this EDIT gets a width of 7
[f2 ] -- this BUTTONEDIT gets a width of 5 (7-2)
}
END
If the default width generated by the form compiler
does not fit, the
- dash symbol can
be used to define the real width of the item. In this example, the
form item occupies 7 grid cells, but gets a real width
of 5 (i.e. for an EDIT field, you would be able to
enter 5 characters):
GRID
{
1234567
[f1 - ]
}
END
To make two items appear directly next to each
other, you can use the pipe symbol (
|)
to indicate the end of the first item and the beginning of
the second item:
GRID
{
Info: [f001 |f002 |f003 ]
}
END
If you need the form to support items with a
specific height (more that one line), you can specify
multiple-segment item
tags that occupy several lines of a
grid-area.
To create a multiple-segment item, repeat the item tag
delimiters without the item
identifier on successive
lines:
GRID
{
Multi-segment: [f001 ]
[ ]
[ ]
[ ]
[ ]
}
END
The notation applies to the new LAYOUT section only.
For backward compatibility (when using a SCREEN section),
multiple-segment items can be specified by repeating
the identifier in sub-lines.
If the same item tag (i.e.
using the same
identifier) appears more than once in the
layout, it defines a column of a screen
array:
GRID
{
Single-line static screen array:
[f001 ] [f002 ] [f003 ]
[f001 ] [f002 ] [f003 ]
[f001 ] [f002 ] [f003 ]
[f001 ] [f002 ] [f003 ]
}
END
You can even define a multi-line list of fields:
GRID
{
Multi-line static screen array:
[f001 ] [f002 ]
[f003 ]
[f001 ] [f002 ]
[f003 ]
[f001 ] [f002 ]
[f003 ]
[f001 ] [f002 ]
[f003 ]
}
END