diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-08-24 12:09:21 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-08-24 12:09:21 +0200 |
commit | 37f449b8ddb33bda1939d69db4da2674c9abb28d (patch) | |
tree | a157c959847de5e9395ece4d27172e28fea1ea6a /examples | |
parent | 109bc97912a2197c9d2166bcdeed8ef9f714c102 (diff) | |
download | fpGUI-37f449b8ddb33bda1939d69db4da2674c9abb28d.tar.xz |
ide: Configure IDE dialog now closes when the Esc key is pressed.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/apps/ide/src/frm_configureide.pas | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/apps/ide/src/frm_configureide.pas b/examples/apps/ide/src/frm_configureide.pas index b3fb02da..458c16b0 100644 --- a/examples/apps/ide/src/frm_configureide.pas +++ b/examples/apps/ide/src/frm_configureide.pas @@ -64,6 +64,7 @@ type procedure LoadSettings; procedure SaveSettings; procedure SaveToMacroList(AList: TIDEMacroList); + procedure FormKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean); public constructor Create(AOwner: TComponent); override; destructor Destroy; override; @@ -191,10 +192,17 @@ begin AList.SetValue(cMacro_Target, edtTarget.Text); end; +procedure TConfigureIDEForm.FormKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean); +begin + if KeyCode = keyEscape then + Close; +end; + constructor TConfigureIDEForm.Create(AOwner: TComponent); begin inherited Create(AOwner); FInternalMacroList := TIDEMacroList.Create; + OnKeyPress := @FormKeyPressed; end; destructor TConfigureIDEForm.Destroy; |