Command: wtable

Syntax

{ <window> = } wtable <file>

or

{ <window>= } wtable {
   <sub_panel_block>
}

Description

Define a table window, i.e. a matrix of sub-panels.

Parameters

Switches

Block

The <sub_panel_block> or the contents of <file> is made up of definition statements each describing a sub-panel or providing control information for layout purposes. The sub-panels are assumed to define one logical row of the matrix.

The general form is:

{<name> :} <sub-panel> {<parameters>} {<switches>}

where:

Notes

Selection may be made from sub-panels during command polling or during pop-up menu selection when used with the -m option.

Details of sub-panel attributes may be examined or set after window creation via the window structure member window.panels, or by a sub-panel’s column name.

Table windows are always created with scrollbars, which are only made visible when the window size is not large enough to accommodate all rows.

Example

Create a table window with 1000 rows, each with 5 columns. Make 5 rows visible initially, and make one row at a time selectable.

window emp_table = wtable -row=1000,-sel,-vis=5 {
    sname: text -bc=white,-c=20,-head='Surname'
    cnames: text -bc=white,-c=32,-head='Forenames'
    sex: options <'Male','Female'>,-head='Sex'
    marital: check_button 'Married',-head='Married'
    empno: text -bc=white,-c=12,-head='Id'
}

See Also

Commands:

embed, poll, wclose, window, wopen, wpanel, wsize

Identifiers:

win# (window), window_numbers (numeric)

Structures:

panel, window (table)