class_="lineup"
The <widget class_="lineup">
is a specialized alternative to
<widget class_="sorter">
, which allows for selection, ordering, and
sorting from a collection of columns or similar objects. (Available as of version
12.06)
Syntax
<dynamic items="{pkg(;)}" from="{lst()}" to="{lst()}"> <widget class_="lineup_" itemsvalue_="@items" fromlistvalue_="@from" tolistvalue_="@to" dir_="0|1" bulkmove_="0|1" readonly_="0|1" fromlabel_="[LABEL TEXT]" tolabel_="[LABEL TEXT]"> [1010data_QUERY] </widget> </dynamic>
There are two possible sources of metadata for the biscuits that the
lineup
widget displays, and each source provides the same information:
the required column name
and the optional columns label
,
type
, and sort
.
- A [1010data_QUERY] resulting in a table containing the
name
column and the optional columnslabel
,type
, andsort
. Specify the [1010data_QUERY] between the opening and closing tags of the<widget>
. If the query result does not contain a column calledname
, the widget uses the first column as thename
column, and then fills in the rest of the columns by position if they are available (in the orderlabel
,type
, andsort
). - A package for the
lineup
attributeitemsvalue_
.itemsvalue_
is a dynamic variable name consisting of thename
column and the optional columnslabel
,type
, andsort
.
Attributes
The attributes in this list are specific to widgets with class_="lineup"
.
bulkmove_
- Determines whether to include bulk move buttons () transferring all items
between sorting columns. Accepts a
1
or0
. dir_
- Determines the location of the "To" and "From" columns in the widget. Accepts a
1
or0
. fromlabel_
- The optional header for the "From" column. This attribute accepts a string.
fromlistvalue_
- A dynamic variable name containing a list of strings/symbols corresponding to elements
of the
name
column ofitemsvalue_
. This list appears in the "From" column. This attribute is required. height_
- The numeric height for the widget container, in pixels. The default value is 200.
itemsvalue_
- A dynamic variable name containing a package of several columns of metadata for the items to be selected, ordered, or sorted.
readonly_
- Determines whether drag-and-drop reordering of biscuits is allowed. Accepts a
1
or0
. tolabel_
- The optional header for the "To" column. This attribute accepts a string.
tolistvalue_
- A dynamic variable name containing a list of strings/symbols corresponding to elements
of the
name
column ofitemsvalue_
. This list appears in the "To" column. This attribute is required. width_
- The numeric width for the widget container, in pixels. The default value is 200.
tooltips_
The values displayed when you point the mouse to a biscuit in the widget.
tooltips_
accepts a package which maps column names in the query (oritemsvalue_
) to labels.By default,
tooltips_="{pkg('label''name''typename'; 'Label''Name''Type')}"
.typename
displays internal typecodes as strings (integer instead of i, for example). (Available as of version 15.11)
Example for class_="lineup"
This example creates a simple list of values that can be sorted in the "From" list on the left and dragged into the "To" list on the right. Results are shown below the code. Note the default tooltip displaying Label, Name, and Type.
<dynamic f="{'one''two''three'}" t="{lst()}"> <widget class_="lineup" fromlistvalue_="f" tolistvalue_="t" fromlabel_="From" tolabel_="To" bulkmove_="1"> <table cols="name,label,type"> one, One, a two, Two, f three, Three, j </table> </widget> <widget class_="sorter" listvalue_="f" tolistvalue_="t"> <table cols="name,label,type"> one, One, a two, Two, f three, Three, j </table> </widget> </dynamic>