type
=“table”
layout
s
<layout type="table" id="option-table"> <append_items> <!-- ... --> </append_items> </layout>
The contents of a
layout
s with
type
=“table”
specify the table
layout manager methods that get invoked to
generate
() its contents.
type
=“table”
layout
s
A container
with a
type
=“table”
creates a container that uses the
table layout manager.
x::w::new_tablelayoutmanager
<container> <name>option-table</name> <type>table</type> <style>highlight</style> <config> <header>option-table-header-1</header> <header>option-table-header-2</header> </config> <elements>option-table-elements</elements> </container> <factory id="option-table-header-1" type="factory"> <element> <label type='theme_text'>Name</label> </element> </factory> <factory id="option-table-header-2" type="factory"> <element> <label type='theme_text'>Value</label> </element> </factory> <factory id="option-table-elements" type="elements"> <show_all> <element>option-table</element> </show_all> </factory>
The optional
style
's value is
“highlight” (default) or “bullet”.
The
config
element initializes the
x::w::new_tablelayoutmanager
that creates the container:
table_width
Sets the
x::w::new_tablelayoutmanager
's
table_width
value:
<config> <table_width>40</table_width> </config>
maximum_table_width
Sets the
x::w::new_tablelayoutmanager
's
maximum_table_width
value:
<config> <maximum_table_width>40</maximum_table_width> </config>
<unlimited_table_width/>
Invokes
x::w::new_tablelayoutmanager
's
unlimited_table_width
() method.
adjustable_column_widths
<config> <adjustable_column_widths /> </config> <config> <adjustable_column_widths> <name>demo_table</name> </adjustable_column_widths> </config> <config> <adjustable_column_widths> <name>demo_table</name> <norestore /> </adjustable_column_widths> </config>
This element sets
x::w::new_tablelayoutmanager
's
adjustable_column_widths
to enable adjustable
column widths.
The name
gives a unique label to this
table widget (a unique label in its window) which identifies the
table widget's column widths and restores them the next time the
window gets opened. An unspecified name
,
or an empty <adjustable_column_widths/>
creates a table with adjustable columns that get reset to their
initial default size every time.
An explicit <norestore/>
serves as an exception, a
one-time override that does not restore the previous table column
widths but still saves the resulting column widths for the next
time the table gets created.
extra_table_appearance
Sets the
x::w::new_tablelayoutmanager
's
extra_table_appearance
value:
<config> <extra_table_appearance>main-table</extra_table_appearance> </config> <!-- ... --> <appearance id="main-table" type="table"> <!-- ... --> </appearance>
The value of the element specifies an
appearance
object of type
=“table”.
x::w::new_tablelayoutmanager
inherits
from
x::w::new_listlayoutmanager
,
and all
config
values that
initialize
x::w::new_listlayoutmanager
s
also appear in a
type
=“table”
container
's
config
.
Notably is the
columns
value that sets the
number of columns in the table; but this gets set automatically
to the number of header
s.
A list of
header
values defines the contents of the
table's header row.
Each header
gives a name of a
The header for each header gives the name of a
type
=“factory”
factory
.
Each factory
should create one
widget, usually just a
plain label.
The number of header
s sets the
columns
value, the numbers of
columns in the table/list.