Tables - activating and selecting items


Selecting lines using a mouse

A selected line is by default displayed with white text on a blue background. The style flag WS_HLIGHT_DARKEN, which darkens a selected line, is available as an alternative.

Single selection table

Clicking a line with the left mouse button selects it, deselecting all others. If the table cell clicked on is editable, it becomes activated for editing.

Multiple selection table

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

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

CTRL-CLICK toggles a line from deselected to selected or vice versa.

SHIFT-CLICK selects the current line and all lines between it and the previously selected line.

To select a group of lines 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.

If the last cell clicked on is editable, it becomes activated for editing


Using the keyboard with tables

The effect of a key may differ if an editable cell has focus.

Non-editable table

TAB, BACKTAB

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

UP, DOWN ARROW

Select the next highest or lowest line in the table.

PAGE UP, DOWN

Move to the top or bottom of the current page, then to the top or bottom of the previous page.


Editable table

TAB, BACKTAB

Move focus to the next | previous editable cell.

CTRL-TAB, CTRL-BACKTAB

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

UP, DOWN ARROW

In an editable cell of TCT_LISTEDIT or TCT_LISTBUTTON type, select the next | previous value. No effect in an editable TCT_TEXTBOX cell.

CTRL-UP, CTRL-DOWN

Select the next highest or lowest line in the table.

LEFT, RIGHT ARROW

In a TCT_TEXTBOX or TCT_LISTEDIT cell, these keys perform the usual text editing functions. In a TCT_LISTBUTTON cell, they select the next | previous value.

PAGE UP, DOWN

In a drop down list, move to the top or bottom of the current page, then to the top or bottom of the previous page.

CTRL-PAGE UP, CTRL-PAGE DOWN

Move to the top or bottom of the current page, then to the top or bottom of the previous page.


RELATED TOPICS

Tables

Editing table values at run time