[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'ComCtrls' (#lcl)

TCustomTabControl.KeyDown

Handles page navigation using the Tab key.

Declaration

Source position: comctrls.pp line 443

protected procedure TCustomTabControl.KeyDown(

  var Key: Word;

  Shift: TShiftState

); override;

Arguments

Key

  

Virtual key code examined in the method.

Shift

  

Key modifier(s) used in the method.

Description

KeyDown is overridden in TCustomTabControl to handle use of the Tab key (VK_TAB) to change the active page in the tabbed control.

The Options property must contain the value nboKeyboardTabSwitch to enable the tab switching feature. Pressing Ctrl+Tab switches to the next page by incrementing the PageIndex value. Pressing Ctrl+Shift+Tab switches to the previous page by decrementing the PageIndex value.

If Key is not the VK_TAB virtual key code, the inherited method is called to handle the values in Key and Shift.

See also

TCustomTabControl.Options

  

The set of Options for the Notebook: Show close buttons on the tabs, multi-line tabs.

TCustomTabControl.PageIndex

  

PageIndex - Index number of the current page.

TCTabControlOption

  

TCTabControlOption - Show the close button on a tab, allow multi-line tabs.

TWinControl.KeyDown

  

Signals the OnKeyDown event handler (when assigned).