Vcl.DBCtrls.TDBRichEdit.KeyPress

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure KeyPress(var Key: Char); override;

C++

DYNAMIC void __fastcall KeyPress(System::WideChar &Key);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Vcl.DBCtrls.pas
Vcl.DBCtrls.hpp
Vcl.DBCtrls TDBRichEdit

Description

Supplements the inherited method to handle any keystrokes that alter the state of the edit control.

KeyPress first calls the inherited method, which calls the OnKeyPress event handler. Next, KeyPress checks the value of the key, and throws it away if it is not a valid character for the field type, or if there is no link to a database field. Valid characters cause KeyPress to attempt to put the dataset into edit mode.

Pressing the Escape key causes KeyPress to throw away all unposted edits. Pressing the Pause key causes KeyPress to call LoadMemo to load the value of the memo field associated with the rich edit control.

Note: Applications cannot call this protected method directly. It is called automatically in response to Windows events.

See Also