summaryrefslogtreecommitdiff
path: root/examples/apps
diff options
context:
space:
mode:
Diffstat (limited to 'examples/apps')
-rw-r--r--examples/apps/ide/src/frm_configureide.pas4
-rw-r--r--examples/apps/ide/src/frm_projectoptions.pas10
2 files changed, 11 insertions, 3 deletions
diff --git a/examples/apps/ide/src/frm_configureide.pas b/examples/apps/ide/src/frm_configureide.pas
index fad0418f..51061a42 100644
--- a/examples/apps/ide/src/frm_configureide.pas
+++ b/examples/apps/ide/src/frm_configureide.pas
@@ -1,7 +1,7 @@
{
fpGUI IDE - Maximus
- Copyright (C) 2012 - 2013 Graeme Geldenhuys
+ Copyright (C) 2012 - 2014 Graeme Geldenhuys
See the file COPYING.modifiedLGPL, included in this distribution,
for details about redistributing fpGUI.
@@ -229,7 +229,6 @@ constructor TConfigureIDEForm.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FInternalMacroList := TIDEMacroList.Create;
- OnKeyPress := @FormKeyPressed;
end;
destructor TConfigureIDEForm.Destroy;
@@ -248,6 +247,7 @@ begin
Hint := '';
ShowHint := True;
WindowPosition := wpOneThirdDown;
+ OnKeyPress := @FormKeyPressed;
btnCancel := TfpgButton.Create(self);
with btnCancel do
diff --git a/examples/apps/ide/src/frm_projectoptions.pas b/examples/apps/ide/src/frm_projectoptions.pas
index 1e1c318a..a3e43d6a 100644
--- a/examples/apps/ide/src/frm_projectoptions.pas
+++ b/examples/apps/ide/src/frm_projectoptions.pas
@@ -1,7 +1,7 @@
{
fpGUI IDE - Maximus
- Copyright (C) 2012 - 2013 Graeme Geldenhuys
+ Copyright (C) 2012 - 2014 Graeme Geldenhuys
See the file COPYING.modifiedLGPL, included in this distribution,
for details about redistributing fpGUI.
@@ -103,6 +103,7 @@ type
procedure CleanupCompilerDirs;
procedure CleanupUserMacrosGrid;
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;
@@ -582,6 +583,12 @@ begin
// AList.SetValue(cMacro_FPCSrcDir, edtFPCSrcDir.Directory);
end;
+procedure TProjectOptionsForm.FormKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean);
+begin
+ if KeyCode = keyEscape then
+ Close;
+end;
+
constructor TProjectOptionsForm.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
@@ -603,6 +610,7 @@ begin
WindowTitle := 'Project Options';
Hint := '';
ShowHint := True;
+ OnKeyPress := @FormKeyPressed;
btnCancel := TfpgButton.Create(self);
with btnCancel do