RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomColorBox.KeyPress Method

Generates an OnKeyPress event.

Pascal
procedure KeyPress(var Key: Char); override;
C++
virtual __fastcall KeyPress(Char Key);

Applications can't call this protected method. It is called automatically when the user presses a key while the color box has focus. 

Key is the key code of the key that was pressed. 

TCustomColorBox overrides the inherited KeyPress method to display a color selection dialog if the user presses the Enter key while the custom color item has focus. Otherwise, KeyPress calls the inherited method, which generates an OnKeyPress event. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!