Show: Delphi C++
Display Preferences

Vcl.Forms.TForm.KeyPreview

From XE2 API Documentation
Jump to: navigation, search

Delphi

property KeyPreview;

C++

__property KeyPreview = {default=0};

Properties

Type Visibility Source Unit Parent
property published
Vcl.Forms.pas
Vcl.Forms.hpp
Vcl.Forms TForm

Description

Specifies whether the form should receive keyboard events before the active control.

Vcl.Forms.TForm.KeyPreview inherits from Vcl.Forms.TCustomForm.KeyPreview. All content below this line refers to Vcl.Forms.TCustomForm.KeyPreview.

Specifies whether the form should receive keyboard events before the active control.

If KeyPreview is true, keyboard events occur on the form before they occur on the active control. (The active control is specified by the ActiveControl property.)

If KeyPreview is false, keyboard events occur only on the active control.

Navigation keys (Tab, BackTab, the arrow keys, and so on) are unaffected by KeyPreview because they do not generate keyboard events. Similarly, when a button has focus or when its Default property is true, the Enter key is unaffected by KeyPreview because it does not generate a keyboard events.

KeyPreview is false by default.

See Also

Personal tools
Previous Versions
Translations