ide: abort/close compile dialog on ESC

git-svn-id: trunk@23495 -
This commit is contained in:
paul 2010-01-20 07:06:43 +00:00
parent b2058afe7b
commit 57615639f1
2 changed files with 11 additions and 1 deletions

View File

@ -14,7 +14,9 @@ object CompileInfoDlg: TCompileInfoDlg
ClientHeight = 200
ClientWidth = 386
FormStyle = fsStayOnTop
KeyPreview = True
OnCreate = FormCreate
OnKeyDown = FormKeyDown
Position = poScreenCenter
LCLVersion = '0.9.29'
object PnlTitle: TPanel
@ -93,6 +95,7 @@ object CompileInfoDlg: TCompileInfoDlg
Width = 75
Anchors = [akTop]
AutoSize = True
Cancel = True
Caption = '&OK'
Constraints.MinHeight = 23
Constraints.MinWidth = 75

View File

@ -30,7 +30,7 @@ unit InfoBuild;
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, Buttons,
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, Buttons, LCLType,
LCLProc, ExtCtrls, StdCtrls, ExtDlgs, LazIDEIntf, LazarusIDEStrConsts;
type
@ -64,6 +64,7 @@ type
PnlTitle : TPanel;
procedure BCloseClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
private
NHints : Integer;
NWarnings : Integer;
@ -144,6 +145,12 @@ begin
SetStatus('');
end;
procedure TCompileInfoDlg.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key = VK_ESCAPE then
BCloseClick(Sender);
end;
procedure TCompileInfoDlg.SetProjectName(const Sname : String);
begin