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.

You must provide one of the following sources:
  • A [1010data_QUERY] resulting in a table containing the name column and the optional columns label, type, and sort. Specify the [1010data_QUERY] between the opening and closing tags of the <widget>. If the query result does not contain a column called name, the widget uses the first column as the name column, and then fills in the rest of the columns by position if they are available (in the order label, type, and sort).
  • A package for the lineup attribute itemsvalue_. itemsvalue_ is a dynamic variable name consisting of the name column and the optional columns label, type, and sort.

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 or 0.

When bulkmove="1", the bulk move buttons appear.

When bulkmove="0", no bulk move buttons appear. This is the default value.

dir_
Determines the location of the "To" and "From" columns in the widget. Accepts a 1 or 0.

When dir="0", the widget presents "From" on the left and "To" on the right. This is the default value.

When dir="1", the widget presents "To" on the left and "From" on the right.

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 of itemsvalue_. 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.

The package contains the following columns of metadata:

name
The name of the item to be selected, ordered, or sorted. The name must correspond to the value bound in the fromlistvalue_ /tolistvalue_ attribute. This column is required.
label
The label of the item to be selected, ordered, or sorted. The label is the text displayed on the biscuit. This column is optional. If a label is not specified, the value from the name column is used.
type
Internal numeric typecodes indicating MDB datatypes (i, f, j, a). Known typecodes result in TRS color coding, while unknown or missing typecodes result in the color gray. This column is optional.
sort
Accepts 0 or 1. This column is optional.

When sort="0", the default sort is sort up. This is the default value.

When sort="1", the default sort is sort down.

readonly_
Determines whether drag-and-drop reordering of biscuits is allowed. Accepts a 1 or 0.

When readonly="1", the widget is read-only. This feature overrides bulkmove.

When readonly="0", the biscuits are movable. This is the default value.
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 of itemsvalue_. 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 (or itemsvalue_) 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>