Listboxes - activating and selecting items


Using the keyboard with listboxes

The following keys are used to manipulate listboxes:

TAB, BACKTAB

Move input focus out of the listbox to the next | previous control.

ARROW KEYS

Move up and down an opened list. From an unopened LIST_BUTTON or LIST_EDIT, display the previous | next line of the list without opening the box. (LEFT and RIGHT ARROW retain their usual editing function in LIST_EDIT boxes.)

HOME, END

Move to the top or bottom of an opened list. From an unopened LIST_BUTTON or LIST_EDIT, display the top or bottom line without opening the box.

PAGE UP, DOWN

As HOME and END, but move to top or bottom of current list - then to the top or bottom of the previous page.

RETURN

Close a LIST_BUTTON or LIST_EDIT, generating a single click event. Pressing RETURN in a LIST_BOX generates a double click event (but has no other effect).

SPACE

Toggle a line in a multiple-selection listbox from selected to deselected or vice versa.


Selecting listbox items using a mouse

Single selection listbox

Clicking an item with the left mouse button selects it, deselecting all others. One line and one line only may be selected.

Multiple selection listbox

Clicking the left mouse button selects the current item, deselecting all others.

CLICK and drag the mouse to select a group of consecutive items.

CTRL-CLICK toggles an item from deselected to selected or vice versa.

SHIFT-CLICK selects the current item and all items between it and the previously selected item.

To select a group of consecutive items not all of which are visible, CLICK the first line to be selected, navigate to the last line using the scroll bar, and SHIFT-CLICK on the last line.

List buttons

Click on the button label or the arrow button to its right to activate the listbox. The current selection is highlighted. Click on any other item in the listbox to select it, and the listbox closes with the new selection displayed on the button. Clicking on any other part of the screen closes the listbox and leaves the original selection unchanged.

List edit boxes

Press the arrow button on the right of the listbox to open it. Click on any item in the listbox to select it, and the listbox closes with the new selection displayed in the textbox. Clicking on any other part of the screen closes the listbox and leaves the original selection unchanged.


Selecting listbox items using a keyboard

Listboxes

Highlight the item to be selected using the arrow keys, PAGE UP/DOWN, HOME and END keys; then press TAB or BACKTAB to move out of the listbox.

In a multiple selection box, use the SPACE key to toggle a line from selected to deselected or vice versa.

List buttons and list edit boxes

The arrow keys, PAGE UP/DOWN, HOME and END keys can be used to change the current selection, with or without opening the listbox. A listbox cannot be opened without the mouse under GUI Windows.

The RETURN key closes an opened listbox, and generates the event EV_SINGLE_CLICK. Pressing RETURN on a closed listbox has no effect other than to generate the event EV_DOUBLE_CLICK.


RELATED TOPICS

Listboxes