summaryrefslogtreecommitdiff
path: root/examples/apps
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2011-08-24 12:09:21 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2011-08-24 12:09:21 +0200
commit37f449b8ddb33bda1939d69db4da2674c9abb28d (patch)
treea157c959847de5e9395ece4d27172e28fea1ea6a /examples/apps
parent109bc97912a2197c9d2166bcdeed8ef9f714c102 (diff)
downloadfpGUI-37f449b8ddb33bda1939d69db4da2674c9abb28d.tar.xz
ide: Configure IDE dialog now closes when the Esc key is pressed.
Diffstat (limited to 'examples/apps')
-rw-r--r--examples/apps/ide/src/frm_configureide.pas8
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;