ProvideX V8.20 > Language Reference > 2. Directives
186
Formatted
A formatted list box allows you to display multiple data elements over multiple
columns in a table format. This type of list box is created by adding FMT= settings to
the LIST_BOX definition (see Format 1: Define/Create List Box, p.182).
FMT= Alignment Settings
The following settings allow you to define the alignment of formatted list box columns:
"Ln"
Left justify alignment code followed by n width in column units.
"Rn"
Right justify alignment code followed by n width in column units.
"Cn"
Centered alignment code followed by n width in column units.
"Nn"
Numeric decimal point alignment followed by n width in column units.
Skip inputted field (don't show)
"S"
"Bn"
Insert n blanks
Line break
"/"
The list of columns is a space-separated string enclosed in quotation marks. Each
column is formatted with an alignment code for left, right or centre (L, R, C). The
width in the format definition is the display/window width, not the number of
characters in the text. Each new row is delineated by a /slash. To hide data, use "S"
to indicate that a column is to be skipped ­ data is present, but not displayed and the
user cannot gain access to the column.
Note: The maximum length of an element in a formatted list box is 256 bytes.
Example:
LIST_BOX 10000,@(5,5,35,10),FMT="L15 R5 N12 C3/B5 L25"
This loads the contents of the columns in a formatted list box from a delimited data
string (positional data for the entries in the list box). The default delimiter is the SEP
character (e.g., $8A$). To change this, use the SEP= option. Note that the value for
the field delimiter (in this case, SEP) and the value signalling the end of row (in this
case, $0A$) must be different. For the previous example:
"1123 East Main"+SEP+"Ont"+SEP+" 123.45"+SEP+"*"+SEP+"North Bay"+SEP+$0A$
Position
Width
Contents
Alignment
Col 1, Line 1
L = Left
15
1123 East Main
Col 2, Line 1
R = Right
5
Ont
Col 3, Line 1
N = Numeric/Decimal
12
123.45
Col 4, Line 1
C = Centred
3
*
Col 1, Line 2
B = Insert Blanks, 5 = Length
5
Col 2, Line 2
L = Left
25
North Bay