diff --git a/ide/newdialog.lfm b/ide/newdialog.lfm index 181ca25025..469835d542 100644 --- a/ide/newdialog.lfm +++ b/ide/newdialog.lfm @@ -1,36 +1,29 @@ object NewOtherDialog: TNewOtherDialog + Left = 481 + Height = 296 + Top = 362 + Width = 397 + HorzScrollBar.Page = 396 + VertScrollBar.Page = 295 ActiveControl = ItemsTreeView BorderStyle = bsSizeToolWin Caption = 'NewOtherDialog' ClientHeight = 296 ClientWidth = 397 - PixelsPerInch = 112 Position = poScreenCenter - HorzScrollBar.Page = 396 - VertScrollBar.Page = 295 - Left = 481 - Height = 296 - Top = 362 - Width = 397 object ItemsTreeView: TTreeView - Anchors = [akTop, akLeft, akBottom] - BorderSpacing.Around = 6 - DefaultItemHeight = 14 - TabOrder = 0 - OnDblClick = OkButtonClick - OnSelectionChanged = ItemsTreeViewSelectionChanged Left = 6 Height = 246 Top = 6 Width = 178 + Anchors = [akTop, akLeft, akBottom] + BorderSpacing.Around = 6 + DefaultItemHeight = 15 + TabOrder = 0 + OnDblClick = OkButtonClick + OnSelectionChanged = ItemsTreeViewSelectionChanged end object DescriptionGroupBox: TGroupBox - Anchors = [akTop, akLeft, akRight, akBottom] - BorderSpacing.Around = 6 - Caption = 'DescriptionGroupBox' - ClientHeight = 229 - ClientWidth = 197 - TabOrder = 1 AnchorSideLeft.Control = ItemsTreeView AnchorSideLeft.Side = asrBottom AnchorSideRight.Control = Owner @@ -39,45 +32,50 @@ object NewOtherDialog: TNewOtherDialog Height = 246 Top = 6 Width = 201 + Anchors = [akTop, akLeft, akRight, akBottom] + BorderSpacing.Around = 6 + Caption = 'DescriptionGroupBox' + ClientHeight = 228 + ClientWidth = 197 + TabOrder = 1 object DescriptionLabel: TLabel + Left = 6 + Height = 216 + Top = 6 + Width = 185 Align = alClient BorderSpacing.Around = 6 Caption = 'DescriptionLabel' - Color = clNone ParentColor = False WordWrap = True - Left = 6 - Height = 217 - Top = 6 - Width = 185 end end object CancelButton: TButton + Left = 299 + Height = 25 + Top = 265 + Width = 92 Anchors = [akRight, akBottom] AutoSize = True BorderSpacing.Around = 6 - + BorderSpacing.InnerBorder = 4 Caption = 'CancelButton' ModalResult = 2 TabOrder = 2 - Left = 306 - Height = 26 - Top = 264 - Width = 85 end object OkButton: TButton + AnchorSideRight.Control = CancelButton + Left = 220 + Height = 25 + Top = 265 + Width = 73 Anchors = [akRight, akBottom] AutoSize = True BorderSpacing.Around = 6 - + BorderSpacing.InnerBorder = 4 Caption = 'OkButton' Enabled = False OnClick = OkButtonClick TabOrder = 3 - AnchorSideRight.Control = CancelButton - Left = 239 - Height = 26 - Top = 264 - Width = 61 end end diff --git a/ide/newdialog.lrs b/ide/newdialog.lrs index 5fc3b656f0..8a6ba79d76 100644 --- a/ide/newdialog.lrs +++ b/ide/newdialog.lrs @@ -1,28 +1,30 @@ +{ This is an automatically generated lazarus resource file } + LazarusResources.Add('TNewOtherDialog','FORMDATA',[ - 'TPF0'#15'TNewOtherDialog'#14'NewOtherDialog'#13'ActiveControl'#7#13'ItemsTre' - +'eView'#11'BorderStyle'#7#13'bsSizeToolWin'#7'Caption'#6#14'NewOtherDialog' - +#12'ClientHeight'#3'('#1#11'ClientWidth'#3#141#1#13'PixelsPerInch'#2'p'#8'Po' - +'sition'#7#14'poScreenCenter'#18'HorzScrollBar.Page'#3#140#1#18'VertScrollBa' - +'r.Page'#3''''#1#4'Left'#3#225#1#6'Height'#3'('#1#3'Top'#3'j'#1#5'Width'#3 - +#141#1#0#9'TTreeView'#13'ItemsTreeView'#7'Anchors'#11#5'akTop'#6'akLeft'#8'a' - +'kBottom'#0#20'BorderSpacing.Around'#2#6#17'DefaultItemHeight'#2#14#8'TabOrd' - +'er'#2#0#10'OnDblClick'#7#13'OkButtonClick'#18'OnSelectionChanged'#7#29'Item' - +'sTreeViewSelectionChanged'#4'Left'#2#6#6'Height'#3#246#0#3'Top'#2#6#5'Width' - +#3#178#0#0#0#9'TGroupBox'#19'DescriptionGroupBox'#7'Anchors'#11#5'akTop'#6'a' - +'kLeft'#7'akRight'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#7'Caption'#6#19 - +'DescriptionGroupBox'#12'ClientHeight'#3#229#0#11'ClientWidth'#3#197#0#8'Tab' - +'Order'#2#1#22'AnchorSideLeft.Control'#7#13'ItemsTreeView'#19'AnchorSideLeft' - +'.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideR' - +'ight.Side'#7#9'asrBottom'#4'Left'#3#190#0#6'Height'#3#246#0#3'Top'#2#6#5'Wi' - +'dth'#3#201#0#0#6'TLabel'#16'DescriptionLabel'#5'Align'#7#8'alClient'#20'Bor' - +'derSpacing.Around'#2#6#7'Caption'#6#16'DescriptionLabel'#5'Color'#7#6'clNon' - +'e'#11'ParentColor'#8#8'WordWrap'#9#4'Left'#2#6#6'Height'#3#217#0#3'Top'#2#6 - +#5'Width'#3#185#0#0#0#0#7'TButton'#12'CancelButton'#7'Anchors'#11#7'akRight' - +#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#12'Ca' - +'ncelButton'#11'ModalResult'#2#2#8'TabOrder'#2#2#4'Left'#3'2'#1#6'Height'#2 - +#26#3'Top'#3#8#1#5'Width'#2'U'#0#0#7'TButton'#8'OkButton'#7'Anchors'#11#7'ak' - +'Right'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6 - +#8'OkButton'#7'Enabled'#8#7'OnClick'#7#13'OkButtonClick'#8'TabOrder'#2#3#23 - +'AnchorSideRight.Control'#7#12'CancelButton'#4'Left'#3#239#0#6'Height'#2#26#3 - +'Top'#3#8#1#5'Width'#2'='#0#0#0 + 'TPF0'#15'TNewOtherDialog'#14'NewOtherDialog'#4'Left'#3#225#1#6'Height'#3'('#1 + +#3'Top'#3'j'#1#5'Width'#3#141#1#18'HorzScrollBar.Page'#3#140#1#18'VertScroll' + +'Bar.Page'#3''''#1#13'ActiveControl'#7#13'ItemsTreeView'#11'BorderStyle'#7#13 + +'bsSizeToolWin'#7'Caption'#6#14'NewOtherDialog'#12'ClientHeight'#3'('#1#11'C' + +'lientWidth'#3#141#1#8'Position'#7#14'poScreenCenter'#0#9'TTreeView'#13'Item' + +'sTreeView'#4'Left'#2#6#6'Height'#3#246#0#3'Top'#2#6#5'Width'#3#178#0#7'Anch' + +'ors'#11#5'akTop'#6'akLeft'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#17'De' + +'faultItemHeight'#2#15#8'TabOrder'#2#0#10'OnDblClick'#7#13'OkButtonClick'#18 + +'OnSelectionChanged'#7#29'ItemsTreeViewSelectionChanged'#0#0#9'TGroupBox'#19 + +'DescriptionGroupBox'#22'AnchorSideLeft.Control'#7#13'ItemsTreeView'#19'Anch' + +'orSideLeft.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'A' + +'nchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#190#0#6'Height'#3#246#0#3'Top' + +#2#6#5'Width'#3#201#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom' + +#0#20'BorderSpacing.Around'#2#6#7'Caption'#6#19'DescriptionGroupBox'#12'Clie' + +'ntHeight'#3#228#0#11'ClientWidth'#3#197#0#8'TabOrder'#2#1#0#6'TLabel'#16'De' + +'scriptionLabel'#4'Left'#2#6#6'Height'#3#216#0#3'Top'#2#6#5'Width'#3#185#0#5 + +'Align'#7#8'alClient'#20'BorderSpacing.Around'#2#6#7'Caption'#6#16'Descripti' + +'onLabel'#11'ParentColor'#8#8'WordWrap'#9#0#0#0#7'TButton'#12'CancelButton'#4 + +'Left'#3'+'#1#6'Height'#2#25#3'Top'#3#9#1#5'Width'#2'\'#7'Anchors'#11#7'akRi' + +'ght'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#25'BorderSpac' + +'ing.InnerBorder'#2#4#7'Caption'#6#12'CancelButton'#11'ModalResult'#2#2#8'Ta' + +'bOrder'#2#2#0#0#7'TButton'#8'OkButton'#23'AnchorSideRight.Control'#7#12'Can' + +'celButton'#4'Left'#3#220#0#6'Height'#2#25#3'Top'#3#9#1#5'Width'#2'I'#7'Anch' + +'ors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6 + +#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#8'OkButton'#7'Enabled'#8#7'O' + +'nClick'#7#13'OkButtonClick'#8'TabOrder'#2#3#0#0#0 ]); diff --git a/ide/newdialog.pas b/ide/newdialog.pas index 6098ceebd8..d5853d6b1f 100644 --- a/ide/newdialog.pas +++ b/ide/newdialog.pas @@ -188,8 +188,10 @@ begin if (ANode = nil) or (ANode.Data = nil) or (not (TObject(ANode.Data) is TNewIDEItemTemplate)) then begin - MessageDlg(lisNewDlgNoItemSelected, - lisNewDlgPleaseSelectAnItemFirst, mtInformation, [mbOK], 0); + // don't show message, when double clicking in treeview + if not (Sender is TTreeView) then + MessageDlg(lisNewDlgNoItemSelected, + lisNewDlgPleaseSelectAnItemFirst, mtInformation, [mbOK], 0); FNewItem := nil; exit; end;