TABLE item type
Defines a list view widget.
TABLE
item type definition in form files. See also
the chapter dedicated to table view programming.TABLE item basics
A TABLE
form item type defines a list view to show a scrolling list
of data records in a set of columns.
A TABLE
is controlled by a DISPLAY ARRAY
or INPUT ARRAY
dialog, see List dialogs for more details about this type of dialogs.
Defining a TABLE
The TABLE
form item defines a list view widget to show a set of data
records. It is bound to a screen array
grouping form fields which define the columns of the table.
The screen array definition must have exactly the same number of columns as the
TABLE
form item. Use PHANTOM
fields, if the number of record members in the program array
exceeds the number of columns to be displayed in the TABLE
container.
Column titles can be defined with static labels in the TABLE
layout. However,
this prevents you from localizing the column text. Consider using the TITLE
attribute in
the form field definition corresponding to the table columns.
A TABLE
container can define AGGREGATE
fields to display
summary information for columns.
Front-ends support different presentation and behavior options, which can be
controlled by a STYLE
attribute. For more details, see Style attributes common to all elements and Table style attributes.
Where to use a TABLE
TABLE
form item can be defined in different ways: - As a
TABLE
container in aLAYOUT
tree, within a grid-based layout. - As a
<TABLE >
layout tag with aTABLE
item definition in theATTRIBUTES
section, within a grid-based layout. - As a
TABLE
stack item, inside aSTACK
container, within a stack-based layout.
Defining the TABLE layout and size
The number of field columns composing
the TABLE
container in the form layout defines the initial width of the table
view.
The width of a TABLE
container is by default defined by the number of
visible columns in its layout, and the initial height is defined by the number of rows. To specify
explicitly the width and height of a table, use the WIDTH
and HEIGHT
attributes.
By default, a table is resizable in width and height.
To force a TABLE
to keep the height defined in the form file, use the WANTFIXEDPAGESIZE
attribute.
Table columns can be moved around, their width can be adapted, they can be
hidden/shown, and can be selected to sort the record list automatically. To turn off these features,
use respectively the UNMOVABLECOLUMNS
, UNSIZABLECOLUMNS
, UNHIDABLECOLUMNS
and UNSORTABLECOLUMNS
attributes.