Hi guys
A simple question.

In variety of controls (StringGrid, ComboBox, EditBox) I want to be able
to detect if the user has pressed a CTRL-ENTER combination.
If he has, I want to invoke the Save procedure. If  CTRL-ENTER is NOT
pressed, the control should just handle the key-press as it usually
does.
This is to save the user having to hunt for the mouse and the SAVE
button, if they prefer.

Can someone please give me a short example of how you would detect and
use this, I can't find any examples of the use of OnKeyDown in the
documentation.
eg (in pseudo code) an OnKeyDown event:
if (Key = Chr(13) and ShiftState  = ssCtrl) then SaveStuff

In a similar vein - is it possible to detect the pressing of TAB before
it does what it does, ie moves focus to the next control?


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to