List Object
Parents Children Properties Methods Events
Purpose: Allows the user to select one or more items from a list.

Description

The Items property is either a vector of character vectors or a character matrix, and determines the items in the List.

The size and position of the area used to display the list is defined by Size and Posn. If Size is not chosen to represent an exact number of lines of text, the bottom line of text may be clipped.

The Index property specifies or reports the position of Items in the list box as a positive integer value. If Index has the value "n", it means that the "nth" item in Items is displayed on the top line in the list box. However, it is ignored if all the Items fit within the List object. Note that Index can only be set using ⎕WS and not by ⎕WC. The default value for Index is ⎕IO.

The Style property may be 'Single' (the default) or 'Multi'. 'Single' allows only a single item to be selected. 'Multi' allows several items to be chosen. In either case, if the Select event is enabled, it is generated whenever the selection changes. If Style is 'Multi' the List will generate a Select event every time an item is added to the selected list.

Under Windows, you may select or de-select multiple items in a List object by pressing the Ctrl key at the same time as pressing the left mouse button.

The SelItems property is a Boolean vector with one element per element or row in Items and indicates which (if any) of the items is currently selected (and highlighted).

The VScroll property determines whether or not the list has a scrollbar. Its possible values are :

¯2 scrollbar if required
¯1 scrollbar if required
0 no scrollbar

Note that data in a List is always scrollable if there are more items than will fit in the box. VScroll determines ONLY whether or not a scrollbar is provided.

The MultiColumn property is a Boolean value that specifies whether or not the List object displays its items in columns. The default is 0 which produces a single-column display. If MultiColumn is 1, the List object displays its items in columns whose width is defined by the ColumnWidth property.