lazarus/ide/gotofrm.pas
darius 722a96542d moved TfrmGoto to separate file (gotofrm.pas)
converted gotofrm to .lfm
improved anchoring of new dialog

git-svn-id: trunk@16971 -
2008-10-11 22:13:02 +00:00

69 lines
1.2 KiB
ObjectPascal

unit GotoFrm;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, ExtCtrls, Buttons, LazarusIDEStrConsts, LCLType;
type
{ TfrmGoto }
TfrmGoto = class(TForm)
Label1: TLabel;
Edit1: TEdit;
btnOK: TBitbtn;
btnCancel: TBitBtn;
procedure Edit1KeyDown(Sender: TObject; var Key:Word; Shift:TShiftState);
public
constructor Create(AOwner: TComponent); override;
procedure DoShow; override;
end;
implementation
{ TfrmGoto }
constructor TfrmGoto.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Caption := lisMenuGotoLine;
Label1.Caption := lisUEGotoLine;
Edit1.Caption := '';
btnOK.LoadGlyphFromLazarusResource('btn_ok');
btnCancel.LoadGlyphFromLazarusResource('btn_cancel');
end;
procedure TfrmGoto.DoShow;
begin
Edit1.SelectAll;
Edit1.SetFocus;
inherited DoShow;
end;
procedure TfrmGoto.Edit1KeyDown(Sender: TObject; var Key:Word;
Shift:TShiftState);
begin
if (Key=VK_RETURN) then
begin
ModalResult:=mrOk;
Key := 0;
end;
if (Key=VK_ESCAPE) then
begin
ModalResult:=mrCancel;
Key := 0;
end;
end;
initialization
{$I gotofrm.lrs}
end.