List Box Controls


The list box control presents the user a selection of choices in a box. Multiple selections may be made if the multi-selections flag is set. To select a range of choices, the user selects the first item, then holds the Shift key while selecting the last item in the range. Various keys may be used to navigate in the list including the Home (first selection), End (last selection), Page Up and Page Down, and arrow keys.

The list of choices available may be modified only under program control. The values in the list may be accessed using a zero based list index integer.

Creating

Mnemonic

Description

'LISTBOX'

Create a List Box Control

Manipulating

Mnemonic

Description

'LISTADD'

Add List Item

'LISTCLR'

Clear List

'LISTDEL'

Delete List Item

'LISTMSEL'

Select Multiple List Items

'LISTRESUME'

Resume List Updates

'LISTSEL'

Select List Item

'LISTSUSPEND'

Suspend List Updates

'LISTUNSEL'

Deselect List Item

Querying

CTRL() Function

Information Returned

0

Outer rectangle of the control in current scaled units.

1

Text of selected items, delimited by $0A$ (but no final $0A$).

2

Indices of all selected items.

3

Number of selected items followed by the total number of items in the list.

4

Control class and type.

7

Text of all items with ($0A$) after each paragraph, including the last item.

8

Visible/invisible and enabled/disabled status of the control.

15

Background color of the control.

16

Foreground color of the control.