DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Command options by class

List class options

List class options apply to widgets created with VtDrawnList(1vtcl) and VtList(1vtcl).

The following list class options are available:


-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).

An additional callback key, itemPosition, indicates the selected item position.


-columns integer (CS)
Specifies the width of the widget. In graphical mode this makes the width of the object (integer times the average character width of the font) wide. See the -columnWidth option of VtSetAppValues(1vtcl) 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)
Specifies the callback to call when the user double-clicks (graphical mode) or presses <Enter> (character mode) on a list item.

Additional callback keys:


itemPosition
selected item position

value
selected item position

-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"}
}

-rows integer (CSG)
Sets the number of rows visible in the DrawnList or List to integer. The default is 4.

-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
(This method is the default). An item in the list is always selected. Users cannot deselect an item; they can 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 pressing <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 the position of the item to display in the top row of the list. Positions are offset by 1; 0 is a special value meaning the last item. Default is 1 (first item).

-verticalScrollBar (C)
If present, always displays a vertical ScrollBar next to the list, If not present, a vertical ScrollBar is displayed only as needed. This option is not valid for DrawnLists.

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004