mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 10:59:20 +02:00
ide: fix "insert menu from template" dialog buttons
git-svn-id: trunk@20615 -
This commit is contained in:
parent
881d1ac331
commit
282a2b206c
@ -1,18 +1,17 @@
|
||||
object TemplateMenuForm: TTemplateMenuForm
|
||||
Left = 537
|
||||
Height = 240
|
||||
Height = 244
|
||||
Top = 199
|
||||
Width = 520
|
||||
Caption = 'TemplateMenuForm'
|
||||
ClientHeight = 240
|
||||
ClientHeight = 244
|
||||
ClientWidth = 520
|
||||
Constraints.MinHeight = 100
|
||||
Constraints.MinWidth = 350
|
||||
OnCreate = FormCreate
|
||||
OnResize = FormResize
|
||||
ParentFont = False
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '0.9.25'
|
||||
LCLVersion = '0.9.27'
|
||||
object Label_template_description: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
@ -36,6 +35,15 @@ object TemplateMenuForm: TTemplateMenuForm
|
||||
Caption = 'Label_template_view'
|
||||
ParentColor = False
|
||||
end
|
||||
object ButtonPanel1: TButtonPanel
|
||||
Left = 6
|
||||
Height = 26
|
||||
Top = 212
|
||||
Width = 508
|
||||
TabOrder = 3
|
||||
ShowButtons = [pbOK, pbCancel]
|
||||
ShowBevel = False
|
||||
end
|
||||
object TemplatesListBox: TListBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Label_template_description
|
||||
@ -43,12 +51,13 @@ object TemplateMenuForm: TTemplateMenuForm
|
||||
AnchorSideBottom.Control = ListBoxView
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 179
|
||||
Height = 180
|
||||
Top = 26
|
||||
Width = 244
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 0
|
||||
OnClick = TemplatesListBoxClick
|
||||
TabOrder = 0
|
||||
end
|
||||
@ -59,14 +68,15 @@ object TemplateMenuForm: TTemplateMenuForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = CancelBitBtn
|
||||
AnchorSideBottom.Control = ButtonPanel1
|
||||
Left = 262
|
||||
Height = 179
|
||||
Height = 180
|
||||
Top = 26
|
||||
Width = 252
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Around = 6
|
||||
ItemHeight = 0
|
||||
TabOrder = 1
|
||||
end
|
||||
object Edit_template_description: TEdit
|
||||
@ -77,7 +87,7 @@ object TemplateMenuForm: TTemplateMenuForm
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 23
|
||||
Top = 211
|
||||
Top = 212
|
||||
Width = 244
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
@ -85,44 +95,4 @@ object TemplateMenuForm: TTemplateMenuForm
|
||||
Text = 'Edit_template_description'
|
||||
Visible = False
|
||||
end
|
||||
object OKBitBtn: TBitBtn
|
||||
AnchorSideRight.Control = CancelBitBtn
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 420
|
||||
Height = 23
|
||||
Top = 211
|
||||
Width = 36
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = '&ÎÊ'
|
||||
Default = True
|
||||
Kind = bkOK
|
||||
ModalResult = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = OKBitBtnClick
|
||||
TabOrder = 3
|
||||
end
|
||||
object CancelBitBtn: TBitBtn
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 462
|
||||
Height = 23
|
||||
Top = 211
|
||||
Width = 52
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Cancel = True
|
||||
Caption = 'Îòìåíà'
|
||||
Kind = bkCancel
|
||||
ModalResult = 2
|
||||
NumGlyphs = 0
|
||||
OnClick = CancelBitBtnClick
|
||||
TabOrder = 4
|
||||
end
|
||||
end
|
||||
|
@ -2,48 +2,38 @@
|
||||
|
||||
LazarusResources.Add('TTemplateMenuForm','FORMDATA',[
|
||||
'TPF0'#17'TTemplateMenuForm'#16'TemplateMenuForm'#4'Left'#3#25#2#6'Height'#3
|
||||
+#240#0#3'Top'#3#199#0#5'Width'#3#8#2#7'Caption'#6#16'TemplateMenuForm'#12'Cl'
|
||||
+'ientHeight'#3#240#0#11'ClientWidth'#3#8#2#21'Constraints.MinHeight'#2'd'#20
|
||||
+#244#0#3'Top'#3#199#0#5'Width'#3#8#2#7'Caption'#6#16'TemplateMenuForm'#12'Cl'
|
||||
+'ientHeight'#3#244#0#11'ClientWidth'#3#8#2#21'Constraints.MinHeight'#2'd'#20
|
||||
+'Constraints.MinWidth'#3'^'#1#8'OnCreate'#7#10'FormCreate'#8'OnResize'#7#10
|
||||
+'FormResize'#10'ParentFont'#8#8'Position'#7#14'poScreenCenter'#10'LCLVersion'
|
||||
+#6#6'0.9.25'#0#6'TLabel'#26'Label_template_description'#22'AnchorSideLeft.Co'
|
||||
+'ntrol'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2#6#6'Height'
|
||||
+#2#14#3'Top'#2#6#5'Width'#3#132#0#18'BorderSpacing.Left'#2#6#17'BorderSpacin'
|
||||
+'g.Top'#2#6#7'Caption'#6#26'Label_template_description'#11'ParentColor'#8#0#0
|
||||
+#6'TLabel'#19'Label_template_view'#22'AnchorSideLeft.Control'#7#11'ListBoxVi'
|
||||
+'ew'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#3#6#1#6'Height'#2#14#3'Top'
|
||||
+#2#6#5'Width'#2'f'#17'BorderSpacing.Top'#2#6#7'Caption'#6#19'Label_template_'
|
||||
+'view'#11'ParentColor'#8#0#0#8'TListBox'#16'TemplatesListBox'#22'AnchorSideL'
|
||||
+'eft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#26'Label_template_descr'
|
||||
+'iption'#18'AnchorSideTop.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7
|
||||
+#11'ListBoxView'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#6#6'Heig'
|
||||
+'ht'#3#179#0#3'Top'#2#26#5'Width'#3#244#0#7'Anchors'#11#5'akTop'#6'akLeft'#8
|
||||
+'akBottom'#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#7'OnClick'
|
||||
+#7#21'TemplatesListBoxClick'#8'TabOrder'#2#0#0#0#8'TListBox'#11'ListBoxView'
|
||||
+#22'AnchorSideLeft.Control'#7#16'TemplatesListBox'#19'AnchorSideLeft.Side'#7
|
||||
+#9'asrBottom'#21'AnchorSideTop.Control'#7#19'Label_template_view'#18'AnchorS'
|
||||
+'ideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'Ancho'
|
||||
+'rSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#12'CancelBit'
|
||||
+'Btn'#4'Left'#3#6#1#6'Height'#3#179#0#3'Top'#2#26#5'Width'#3#252#0#7'Anchors'
|
||||
+#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#18'BorderSpacing.Left'#2#6#20
|
||||
+'BorderSpacing.Around'#2#6#8'TabOrder'#2#1#0#0#5'TEdit'#25'Edit_template_des'
|
||||
+'cription'#22'AnchorSideLeft.Control'#7#16'TemplatesListBox'#21'AnchorSideTo'
|
||||
+'p.Control'#7#16'TemplatesListBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#23
|
||||
+'AnchorSideRight.Control'#7#16'TemplatesListBox'#20'AnchorSideRight.Side'#7#9
|
||||
+'asrBottom'#4'Left'#2#6#6'Height'#2#23#3'Top'#3#211#0#5'Width'#3#244#0#7'Anc'
|
||||
+'hors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpacing.Top'#2#6#8'TabOrd'
|
||||
+'er'#2#2#4'Text'#6#25'Edit_template_description'#7'Visible'#8#0#0#7'TBitBtn'
|
||||
+#8'OKBitBtn'#23'AnchorSideRight.Control'#7#12'CancelBitBtn'#24'AnchorSideBot'
|
||||
+'tom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3
|
||||
+#164#1#6'Height'#2#23#3'Top'#3#211#0#5'Width'#2'$'#7'Anchors'#11#7'akRight'#8
|
||||
+'akBottom'#0#8'AutoSize'#9#19'BorderSpacing.Right'#2#6#20'BorderSpacing.Bott'
|
||||
+'om'#2#6#7'Caption'#6#5'&'#195#142#195#138#7'Default'#9#4'Kind'#7#4'bkOK'#11
|
||||
+'ModalResult'#2#1#9'NumGlyphs'#2#0#7'OnClick'#7#13'OKBitBtnClick'#8'TabOrder'
|
||||
+#2#3#0#0#7'TBitBtn'#12'CancelBitBtn'#23'AnchorSideRight.Control'#7#5'Owner'
|
||||
+#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#5'Ow'
|
||||
+'ner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#206#1#6'Height'#2#23
|
||||
+#3'Top'#3#211#0#5'Width'#2'4'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoS'
|
||||
+'ize'#9#20'BorderSpacing.Around'#2#6#6'Cancel'#9#7'Caption'#6#12#195#142#195
|
||||
+#178#195#172#195#165#195#173#195#160#4'Kind'#7#8'bkCancel'#11'ModalResult'#2
|
||||
+#2#9'NumGlyphs'#2#0#7'OnClick'#7#17'CancelBitBtnClick'#8'TabOrder'#2#4#0#0#0
|
||||
+'FormResize'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#6'0.9.27'#0#6
|
||||
+'TLabel'#26'Label_template_description'#22'AnchorSideLeft.Control'#7#5'Owner'
|
||||
+#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2#6#6'Height'#2#14#3'Top'#2#6#5
|
||||
+'Width'#3#132#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#7'Capti'
|
||||
+'on'#6#26'Label_template_description'#11'ParentColor'#8#0#0#6'TLabel'#19'Lab'
|
||||
+'el_template_view'#22'AnchorSideLeft.Control'#7#11'ListBoxView'#21'AnchorSid'
|
||||
+'eTop.Control'#7#5'Owner'#4'Left'#3#6#1#6'Height'#2#14#3'Top'#2#6#5'Width'#2
|
||||
+'f'#17'BorderSpacing.Top'#2#6#7'Caption'#6#19'Label_template_view'#11'Parent'
|
||||
+'Color'#8#0#0#12'TButtonPanel'#12'ButtonPanel1'#4'Left'#2#6#6'Height'#2#26#3
|
||||
+'Top'#3#212#0#5'Width'#3#252#1#8'TabOrder'#2#3#11'ShowButtons'#11#4'pbOK'#8
|
||||
+'pbCancel'#0#9'ShowBevel'#8#0#0#8'TListBox'#16'TemplatesListBox'#22'AnchorSi'
|
||||
+'deLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#26'Label_template_de'
|
||||
+'scription'#18'AnchorSideTop.Side'#7#9'asrBottom'#24'AnchorSideBottom.Contro'
|
||||
+'l'#7#11'ListBoxView'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#6#6
|
||||
+'Height'#3#180#0#3'Top'#2#26#5'Width'#3#244#0#7'Anchors'#11#5'akTop'#6'akLef'
|
||||
+'t'#8'akBottom'#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#10'It'
|
||||
+'emHeight'#2#0#7'OnClick'#7#21'TemplatesListBoxClick'#8'TabOrder'#2#0#0#0#8
|
||||
+'TListBox'#11'ListBoxView'#22'AnchorSideLeft.Control'#7#16'TemplatesListBox'
|
||||
+#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#19'Label'
|
||||
+'_template_view'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Co'
|
||||
+'ntrol'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBott'
|
||||
+'om.Control'#7#12'ButtonPanel1'#4'Left'#3#6#1#6'Height'#3#180#0#3'Top'#2#26#5
|
||||
+'Width'#3#252#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#18
|
||||
+'BorderSpacing.Left'#2#6#20'BorderSpacing.Around'#2#6#10'ItemHeight'#2#0#8'T'
|
||||
+'abOrder'#2#1#0#0#5'TEdit'#25'Edit_template_description'#22'AnchorSideLeft.C'
|
||||
+'ontrol'#7#16'TemplatesListBox'#21'AnchorSideTop.Control'#7#16'TemplatesList'
|
||||
+'Box'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#16
|
||||
+'TemplatesListBox'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#6#6'Hei'
|
||||
+'ght'#2#23#3'Top'#3#212#0#5'Width'#3#244#0#7'Anchors'#11#5'akTop'#6'akLeft'#7
|
||||
+'akRight'#0#17'BorderSpacing.Top'#2#6#8'TabOrder'#2#2#4'Text'#6#25'Edit_temp'
|
||||
+'late_description'#7'Visible'#8#0#0#0
|
||||
]);
|
||||
|
@ -36,18 +36,16 @@ unit DesignerMenu;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, LCLProc, Forms, Controls, Menus, Graphics, GraphType,
|
||||
Buttons, StdCtrls, ExtCtrls, ComponentEditors, LazConf, ComCtrls, Arrow,
|
||||
Laz_XMLCfg, LazarusIDEStrConsts,
|
||||
PropEdits, IDEProcs;
|
||||
Classes, SysUtils, LResources, LCLProc, Forms, Controls, Menus, Graphics,
|
||||
GraphType, Buttons, StdCtrls, ExtCtrls, ComponentEditors, LazConf, ComCtrls,
|
||||
Arrow, ButtonPanel, Laz_XMLCfg, LazarusIDEStrConsts, PropEdits, IDEProcs;
|
||||
|
||||
type
|
||||
|
||||
{ TTemplateMenuForm }
|
||||
|
||||
TTemplateMenuForm = class(TForm)
|
||||
OKBitBtn: TBitBtn;
|
||||
CancelBitBtn: TBitBtn;
|
||||
ButtonPanel1: TButtonPanel;
|
||||
Edit_template_description: TEdit;
|
||||
Label_template_view: TLabel;
|
||||
Label_template_description: TLabel;
|
||||
@ -2064,6 +2062,8 @@ begin
|
||||
TemplateView('menu_1/subitem_', 0);
|
||||
end;
|
||||
end;
|
||||
ButtonPanel1.OKButton.OnClick := @OKBitBtnClick;
|
||||
ButtonPanel1.CancelButton.OnClick := @CancelBitBtnClick;
|
||||
end;
|
||||
|
||||
procedure TTemplateMenuForm.FormResize(Sender: TObject);
|
||||
@ -2073,12 +2073,12 @@ end;
|
||||
|
||||
procedure TTemplateMenuForm.CancelBitBtnClick(Sender: TObject);
|
||||
begin
|
||||
SelectedMenuTemplate:=0;
|
||||
ModalResult:=mrCancel;
|
||||
SelectedMenuTemplate := 0;
|
||||
end;
|
||||
|
||||
procedure TTemplateMenuForm.OKBitBtnClick(Sender: TObject);
|
||||
var i: Integer;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
for i:=0 to TemplatesListBox.Items.Count-1 do
|
||||
if TemplatesListBox.Selected[i] then SelectedMenuTemplate:=i + 1;
|
||||
@ -2091,7 +2091,6 @@ begin
|
||||
// content of "Description" is generated from LazarusIDEStrConsts
|
||||
Description:=lisMenuEditorNewTemplateDescription;
|
||||
end;
|
||||
ModalResult:=mrOK;
|
||||
end;
|
||||
|
||||
procedure TTemplateMenuForm.TemplatesListBoxClick(Sender: TObject);
|
||||
|
Loading…
Reference in New Issue
Block a user