- -autoSelect boolean (CS)
-
In character mode, combining this option with
-selection BROWSE (which is the default) will automatically
select each item as the user arrows down the list.
This option has no effect in graphical mode.
- -callback cmd (C)
-
Sets the callback cmd to call when you select items in the list
(using <Space>, <Enter>, or single mouse click).
Additional callback keys:
- itemPosition
-
selected item position
- -columns integer (CS)
-
In the graphical environment this will make the
width of object integer ∗ (the average character width
of the font) wide. See the -columnWidth option of
VtSetAppValues(VTCL)
if the maximum character width of the font is needed instead.
In character mode, this option makes
the object integer columns wide.
- -defaultCallback cmd (C)
-
Callback called when the user double clicks (graphical mode) or
pressed <Enter> (character mode) on a list item.
Additional callback keys:
- (itemPosition
-
selected item position)
- value
-
selected item position
- -fieldList list (C)
-
Sets a row of data for the DrawnList. The default formatting is
used on the list if you do not specify -formatList in the command.
For example:
...
-formatList {{ICON 2} {STRING 20} {STRING 15}} \
-fieldList [list 1 "John Doe" "555-1212"]
...
See the note below.
- -formatList list (CS)
-
Describes the columns used in the DrawnList. This field
contains a list of column descriptions. Each column
description in turn is a list containing the column type, the
column width, and the column's left and right margins. The syntax
is:
{ TYPE WIDTH [Left Margin, Right Margin] }
The left and
right margins are optional parameters. The following specifies
a column that is of type ICON, with a width of 1 icon
and a left and right margin of 5 pixels.
{ ICON 1 5 5 }
Valid types are ICON, STRING, and DATA.
DATA does not display on the
screen; it is used to store item-specific data.
For example:
-formatList { {ICON 3} {STRING 20 5} {DATA} }
The first column is an icon field with a width of 3, the
second column contains a string with a width of 20 and a left
margin of 5, and the third column contains hidden data.
- -horizontalScrollBar boolean (CS)
-
Sets whether or not a horizontal scroll bar is drawn. You should
set the boolean value to TRUE if you want a horizontal
scroll bar, FALSE if not. The default value is FALSE.
This is ignored in character mode. The Maximum size is the width of
formatList.
If formatList changes, the maximum size will change too.
- -iconList pixmap_filename_list (NA)
-
Sets a list of pixmap filenames to use in the DrawnList on graphical
systems. On character systems, specify characters to display instead
of pixmap filenames.
Options specific to character displays should be prefixed
with CHARM_.
For example:
-CHARM_iconList {a b c}
-MOTIF_iconList {a.px b.px c.px}
(In this example, graphical systems load the pixmaps a.px,
b.px, and c.px; character systems load no
pixmaps, but display instead the letters ``a'', ``b'',
and ``c''.)
- -labelFormatList list (CS)
-
Similar to -formatList but applies to the label. (This option is not
available in character mode.) Type ICON may be used as
a format identifier but currently icons are not supported in DrawnList
labels.
- -labelList list (CS)
-
Sets the label above the DrawnList. (Similar to -fieldList,
except that it applies to the label. The format used in
-labelFormatList is used.
This feature is not available in character mode. Note that currently icons
are not supported in DrawnList labels.
- -recordList list_of_lists (C)
-
Sets one or more rows of data for a DrawnList. For example:
{ { 0 1 "field one" "field two"}
{ 1 1 "field one" "field two"}
{ 1 3 "field one" "field two"}
}
See the note below.
- -rows integer (CSG)
-
Sets the number of rows visible in the DrawnList to integer.
- -selection SINGLE | MULTIPLE (CS) (Graphical mode)
-
- -selection SINGLE | BROWSE | MULTIPLE | EXTENDED (CS) (Character mode)
-
The selection options are as follows:
For graphical mode:
- SINGLE
-
(This method is used by default). A single
item is always selected. It is possible to
select a different item, but not to deselect an
item.
- MULTIPLE
-
An item is always selected. It is possible
to drag-select on a different item, or to
select more than one item but not to deselect an item.
For character mode:
- BROWSE
-
(Chosen by default). An item in the list is
always selected. Users cannot deselect an
item; only select a different one.
- SINGLE
-
Simple select and deselect is permitted. Only
one item can be selected at a time.
- MULTIPLE
-
Any number of items can be selected or
deselected by arrowing down to the item
and hitting <Space>. This is the preferred
option to use in character mode for multiple
selections.
- EXTENDED
-
Works like MULTIPLE selection except that you
cannot deselect the last selected item.
If -selection BROWSE is specified, then in graphical mode
the policy SINGLE will be used. If -selection EXTENDED
is specified then in graphical mode the policy MULTIPLE
will be used. This can be overridden by
explicitly setting CHARM_selection and MOTIF_selection.
- -topItemPosition integer (CSG)
-
Sets integer to be the position of the item shown at
the top of the list.