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