mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 12:40:33 +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
|
object frmGoto: TfrmGoto
|
||||||
Left = 244
|
Left = 423
|
||||||
Height = 87
|
Height = 87
|
||||||
Top = 525
|
Top = 427
|
||||||
Width = 250
|
Width = 250
|
||||||
ActiveControl = Edit1
|
ActiveControl = Edit1
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
@ -28,45 +28,23 @@ object frmGoto: TfrmGoto
|
|||||||
Width = 238
|
Width = 238
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
OnKeyDown = Edit1KeyDown
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
Text = 'Edit1'
|
Text = 'Edit1'
|
||||||
end
|
end
|
||||||
object btnOK: TBitBtn
|
object ButtonPanel1: TButtonPanel
|
||||||
AnchorSideTop.Control = Edit1
|
AnchorSideLeft.Control = Owner
|
||||||
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
|
|
||||||
AnchorSideTop.Control = Edit1
|
AnchorSideTop.Control = Edit1
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 167
|
Left = 6
|
||||||
Height = 26
|
Height = 26
|
||||||
Top = 55
|
Top = 55
|
||||||
Width = 77
|
Width = 238
|
||||||
Anchors = [akTop, akRight]
|
Align = alNone
|
||||||
AutoSize = True
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Around = 6
|
TabOrder = 1
|
||||||
Cancel = True
|
ShowButtons = [pbOK, pbCancel]
|
||||||
Caption = 'Cancel'
|
ShowBevel = False
|
||||||
Kind = bkCancel
|
|
||||||
ModalResult = 2
|
|
||||||
NumGlyphs = 0
|
|
||||||
TabOrder = 2
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,24 +1,18 @@
|
|||||||
{ This is an automatically generated lazarus resource file }
|
{ This is an automatically generated lazarus resource file }
|
||||||
|
|
||||||
LazarusResources.Add('TfrmGoto','FORMDATA',[
|
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
|
+'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
|
+#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'
|
+'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'
|
+'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'
|
+'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
|
+'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'
|
+'Width'#3#238#0#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#8'TabOrder'
|
||||||
+#7#12'Edit1KeyDown'#8'TabOrder'#2#0#4'Text'#6#5'Edit1'#0#0#7'TBitBtn'#5'btnO'
|
+#2#0#4'Text'#6#5'Edit1'#0#0#12'TButtonPanel'#12'ButtonPanel1'#22'AnchorSideL'
|
||||||
+'K'#21'AnchorSideTop.Control'#7#5'Edit1'#18'AnchorSideTop.Side'#7#9'asrBotto'
|
+'eft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Edit1'#18'AnchorSideT'
|
||||||
+'m'#23'AnchorSideRight.Control'#7#9'btnCancel'#4'Left'#2'f'#6'Height'#2#26#3
|
+'op.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSid'
|
||||||
+'Top'#2'7'#5'Width'#2';'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'AutoSize'#9#20
|
+'eRight.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#26#3'Top'#2'7'#5'Width'
|
||||||
+'BorderSpacing.Around'#2#6#7'Caption'#6#3'&OK'#7'Default'#9#4'Kind'#7#4'bkOK'
|
+#3#238#0#5'Align'#7#6'alNone'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8
|
||||||
+#11'ModalResult'#2#1#9'NumGlyphs'#2#0#8'TabOrder'#2#1#0#0#7'TBitBtn'#9'btnCa'
|
+'TabOrder'#2#1#11'ShowButtons'#11#4'pbOK'#8'pbCancel'#0#9'ShowBevel'#8#0#0#0
|
||||||
+'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
|
|
||||||
]);
|
]);
|
||||||
|
@ -6,18 +6,16 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||||
StdCtrls, ExtCtrls, Buttons, LazarusIDEStrConsts, LCLType;
|
StdCtrls, ExtCtrls, Buttons, LazarusIDEStrConsts, LCLType, ButtonPanel;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
{ TfrmGoto }
|
{ TfrmGoto }
|
||||||
|
|
||||||
TfrmGoto = class(TForm)
|
TfrmGoto = class(TForm)
|
||||||
|
ButtonPanel1: TButtonPanel;
|
||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
Edit1: TEdit;
|
Edit1: TEdit;
|
||||||
btnOK: TBitbtn;
|
|
||||||
btnCancel: TBitBtn;
|
|
||||||
procedure Edit1KeyDown(Sender: TObject; var Key:Word; Shift:TShiftState);
|
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
procedure DoShow; override;
|
procedure DoShow; override;
|
||||||
@ -43,21 +41,6 @@ begin
|
|||||||
inherited DoShow;
|
inherited DoShow;
|
||||||
end;
|
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
|
initialization
|
||||||
{$I gotofrm.lrs}
|
{$I gotofrm.lrs}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user