mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 01:19:29 +02:00
ide: simplify goto form
git-svn-id: trunk@19579 -
This commit is contained in:
parent
b3249c670c
commit
8879a8e5a0
@ -1,7 +1,7 @@
|
||||
object frmGoto: TfrmGoto
|
||||
Left = 244
|
||||
Left = 423
|
||||
Height = 87
|
||||
Top = 525
|
||||
Top = 427
|
||||
Width = 250
|
||||
ActiveControl = Edit1
|
||||
AutoSize = True
|
||||
@ -28,45 +28,23 @@ object frmGoto: TfrmGoto
|
||||
Width = 238
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 6
|
||||
OnKeyDown = Edit1KeyDown
|
||||
TabOrder = 0
|
||||
Text = 'Edit1'
|
||||
end
|
||||
object btnOK: TBitBtn
|
||||
AnchorSideTop.Control = Edit1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = btnCancel
|
||||
Left = 102
|
||||
Height = 26
|
||||
Top = 55
|
||||
Width = 59
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = '&OK'
|
||||
Default = True
|
||||
Kind = bkOK
|
||||
ModalResult = 1
|
||||
NumGlyphs = 0
|
||||
TabOrder = 1
|
||||
end
|
||||
object btnCancel: TBitBtn
|
||||
object ButtonPanel1: TButtonPanel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Edit1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 167
|
||||
Left = 6
|
||||
Height = 26
|
||||
Top = 55
|
||||
Width = 77
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Cancel = True
|
||||
Caption = 'Cancel'
|
||||
Kind = bkCancel
|
||||
ModalResult = 2
|
||||
NumGlyphs = 0
|
||||
TabOrder = 2
|
||||
Width = 238
|
||||
Align = alNone
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
TabOrder = 1
|
||||
ShowButtons = [pbOK, pbCancel]
|
||||
ShowBevel = False
|
||||
end
|
||||
end
|
||||
|
@ -1,24 +1,18 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TfrmGoto','FORMDATA',[
|
||||
'TPF0'#8'TfrmGoto'#7'frmGoto'#4'Left'#3#244#0#6'Height'#2'W'#3'Top'#3#13#2#5
|
||||
'TPF0'#8'TfrmGoto'#7'frmGoto'#4'Left'#3#167#1#6'Height'#2'W'#3'Top'#3#171#1#5
|
||||
+'Width'#3#250#0#13'ActiveControl'#7#5'Edit1'#8'AutoSize'#9#11'BorderIcons'#11
|
||||
+#12'biSystemMenu'#0#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6#7'frmGoto'#12
|
||||
+'ClientHeight'#2'W'#11'ClientWidth'#3#250#0#10'LCLVersion'#6#6'0.9.27'#0#6'T'
|
||||
+'Label'#6'Label1'#4'Left'#2#6#6'Height'#2#14#3'Top'#2#6#5'Width'#3#238#0#5'A'
|
||||
+'lign'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6#6'Label1'#11'Par'
|
||||
+'entColor'#8#0#0#5'TEdit'#5'Edit1'#4'Left'#2#6#6'Height'#2#23#3'Top'#2#26#5
|
||||
+'Width'#3#238#0#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#9'OnKeyDown'
|
||||
+#7#12'Edit1KeyDown'#8'TabOrder'#2#0#4'Text'#6#5'Edit1'#0#0#7'TBitBtn'#5'btnO'
|
||||
+'K'#21'AnchorSideTop.Control'#7#5'Edit1'#18'AnchorSideTop.Side'#7#9'asrBotto'
|
||||
+'m'#23'AnchorSideRight.Control'#7#9'btnCancel'#4'Left'#2'f'#6'Height'#2#26#3
|
||||
+'Top'#2'7'#5'Width'#2';'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'AutoSize'#9#20
|
||||
+'BorderSpacing.Around'#2#6#7'Caption'#6#3'&OK'#7'Default'#9#4'Kind'#7#4'bkOK'
|
||||
+#11'ModalResult'#2#1#9'NumGlyphs'#2#0#8'TabOrder'#2#1#0#0#7'TBitBtn'#9'btnCa'
|
||||
+'ncel'#21'AnchorSideTop.Control'#7#5'Edit1'#18'AnchorSideTop.Side'#7#9'asrBo'
|
||||
+'ttom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'a'
|
||||
+'srBottom'#4'Left'#3#167#0#6'Height'#2#26#3'Top'#2'7'#5'Width'#2'M'#7'Anchor'
|
||||
+'s'#11#5'akTop'#7'akRight'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#6'Ca'
|
||||
+'ncel'#9#7'Caption'#6#6'Cancel'#4'Kind'#7#8'bkCancel'#11'ModalResult'#2#2#9
|
||||
+'NumGlyphs'#2#0#8'TabOrder'#2#2#0#0#0
|
||||
+'Width'#3#238#0#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#8'TabOrder'
|
||||
+#2#0#4'Text'#6#5'Edit1'#0#0#12'TButtonPanel'#12'ButtonPanel1'#22'AnchorSideL'
|
||||
+'eft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Edit1'#18'AnchorSideT'
|
||||
+'op.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSid'
|
||||
+'eRight.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#26#3'Top'#2'7'#5'Width'
|
||||
+#3#238#0#5'Align'#7#6'alNone'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8
|
||||
+'TabOrder'#2#1#11'ShowButtons'#11#4'pbOK'#8'pbCancel'#0#9'ShowBevel'#8#0#0#0
|
||||
]);
|
||||
|
@ -6,18 +6,16 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||
StdCtrls, ExtCtrls, Buttons, LazarusIDEStrConsts, LCLType;
|
||||
StdCtrls, ExtCtrls, Buttons, LazarusIDEStrConsts, LCLType, ButtonPanel;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmGoto }
|
||||
|
||||
TfrmGoto = class(TForm)
|
||||
ButtonPanel1: TButtonPanel;
|
||||
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;
|
||||
@ -43,21 +41,6 @@ begin
|
||||
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}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user