converted to .lfm, added help button, improved anchoring and added splitter for more flexible usage

git-svn-id: trunk@16962 -
This commit is contained in:
darius 2008-10-11 21:42:04 +00:00
parent d91d1ae561
commit 1b7b37d249
4 changed files with 444 additions and 75 deletions

2
.gitattributes vendored
View File

@ -2473,6 +2473,8 @@ ide/multireplacedlg.pas svneol=native#text/pascal
ide/newdialog.lfm svneol=native#text/plain
ide/newdialog.lrs svneol=native#text/plain
ide/newdialog.pas svneol=native#text/pascal
ide/newprojectdlg.lfm svneol=native#text/plain
ide/newprojectdlg.lrs svneol=native#text/plain
ide/newprojectdlg.pp svneol=native#text/pascal
ide/objectlists.pas svneol=native#text/pascal
ide/optionseditorbase.lfm svneol=native#text/pascal

314
ide/newprojectdlg.lfm Normal file
View File

@ -0,0 +1,314 @@
object NewProjectDialog: TNewProjectDialog
Left = 240
Height = 240
Top = 451
Width = 390
HelpContext = 0
ActiveControl = ListBox
Align = alNone
AllowDropFiles = False
AutoScroll = True
AutoSize = False
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
BorderStyle = bsSizeable
Caption = 'NewProjectDialog'
ChildSizing.LeftRightSpacing = 0
ChildSizing.TopBottomSpacing = 0
ChildSizing.HorizontalSpacing = 0
ChildSizing.VerticalSpacing = 0
ChildSizing.ControlsPerLine = 0
ClientHeight = 240
ClientWidth = 390
DockSite = False
DragKind = dkDrag
DragMode = dmManual
Enabled = True
Font.Height = 0
Font.Style = []
FormStyle = fsNormal
ParentBiDiMode = True
ParentFont = False
Position = poScreenCenter
ShowInTaskBar = stDefault
UseDockManager = False
LCLVersion = '0.9.27'
WindowState = wsNormal
object CancelButton: TBitBtn
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 304
Height = 34
Top = 200
Width = 80
HelpContext = 0
Align = alNone
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
Cancel = True
Caption = 'Cancel'
Default = False
Enabled = True
Kind = bkCancel
Layout = blGlyphLeft
Margin = -1
ModalResult = 2
NumGlyphs = 0
OnClick = CancelButtonClick
ParentFont = True
ParentShowHint = True
Spacing = 3
TabOrder = 0
TabStop = True
Visible = True
end
object CreateButton: TBitBtn
AnchorSideRight.Control = CancelButton
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 220
Height = 32
Top = 202
Width = 78
HelpContext = 0
Align = alNone
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
Cancel = False
Caption = '&Create'
Default = True
Enabled = True
Kind = bkYes
Layout = blGlyphLeft
Margin = -1
ModalResult = 6
NumGlyphs = 0
OnClick = CreateButtonClick
ParentFont = True
ParentShowHint = True
Spacing = 3
TabOrder = 1
TabStop = True
Visible = True
end
object Panel1: TPanel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = CancelButton
Left = 6
Height = 188
Top = 6
Width = 378
HelpContext = 0
Align = alNone
Alignment = taCenter
Anchors = [akTop, akLeft, akRight, akBottom]
AutoSize = False
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
BevelInner = bvNone
BevelOuter = bvNone
BevelWidth = 1
BorderWidth = 0
BorderStyle = bsNone
ChildSizing.LeftRightSpacing = 0
ChildSizing.TopBottomSpacing = 0
ChildSizing.HorizontalSpacing = 0
ChildSizing.VerticalSpacing = 0
ChildSizing.ControlsPerLine = 0
ClientHeight = 184
ClientWidth = 374
DockSite = False
DragCursor = crDrag
DragKind = dkDrag
DragMode = dmManual
Enabled = True
FullRepaint = True
ParentColor = True
ParentFont = True
ParentShowHint = True
TabOrder = 2
TabStop = False
Visible = True
object DescriptionGroupBox: TGroupBox
Left = 170
Height = 184
Top = 0
Width = 204
HelpContext = 0
Align = alClient
AutoSize = False
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 0
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
Caption = 'DescriptionGroupBox'
ChildSizing.LeftRightSpacing = 0
ChildSizing.TopBottomSpacing = 0
ChildSizing.HorizontalSpacing = 0
ChildSizing.VerticalSpacing = 0
ChildSizing.ControlsPerLine = 0
ClientHeight = 165
ClientWidth = 200
Ctl3D = False
DockSite = False
DragCursor = crDrag
DragKind = dkDrag
DragMode = dmManual
Enabled = True
ParentBidiMode = True
ParentColor = True
ParentCtl3D = True
ParentFont = True
ParentShowHint = True
TabOrder = 0
TabStop = False
Visible = True
object HelpLabel: TLabel
Left = 6
Height = 153
Top = 6
Width = 188
HelpContext = 0
Align = alClient
Alignment = taLeftJustify
AutoSize = True
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
Caption = 'HelpLabel'
DragCursor = crDrag
DragMode = dmManual
Enabled = True
Layout = tlTop
ParentBidiMode = True
ParentColor = False
ParentFont = True
ParentShowHint = True
ShowAccelChar = True
Transparent = True
Visible = True
WordWrap = True
OptimalFill = False
end
end
object ListBox: TListBox
Left = 0
Height = 184
Top = 0
Width = 165
HelpContext = 0
Align = alLeft
Anchors = []
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 0
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
BorderStyle = bsSingle
ClickOnSelChange = True
Columns = 0
DragCursor = crDrag
DragKind = dkDrag
DragMode = dmManual
ExtendedSelect = True
Enabled = True
IntegralHeight = False
ItemHeight = 0
MultiSelect = False
ParentBidiMode = True
ParentShowHint = True
ParentFont = True
Sorted = False
Style = lbStandard
TabOrder = 1
TabStop = True
TopIndex = -1
Visible = True
end
object Splitter1: TSplitter
Cursor = crHSplit
Left = 165
Height = 184
Top = 0
Width = 5
HelpContext = 0
Align = alLeft
AutoSnap = True
Beveled = False
MinSize = 30
ParentColor = True
ParentShowHint = True
ResizeAnchor = akLeft
ResizeStyle = rsUpdate
Visible = True
end
end
object HelpButton: TBitBtn
AnchorSideLeft.Control = Owner
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 34
Top = 200
Width = 66
HelpContext = 0
Align = alNone
Anchors = [akLeft, akBottom]
AutoSize = True
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
Cancel = False
Caption = '&Help'
Default = False
Enabled = True
Kind = bkHelp
Layout = blGlyphLeft
Margin = -1
ModalResult = 0
NumGlyphs = 0
OnClick = HelpButtonClick
ParentFont = True
ParentShowHint = True
Spacing = 3
TabOrder = 3
TabStop = True
Visible = True
end
end

102
ide/newprojectdlg.lrs Normal file
View File

@ -0,0 +1,102 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TNewProjectDialog','FORMDATA',[
'TPF0'#17'TNewProjectDialog'#16'NewProjectDialog'#4'Left'#3#240#0#6'Height'#3
+#240#0#3'Top'#3#195#1#5'Width'#3#134#1#11'HelpContext'#2#0#13'ActiveControl'
+#7#7'ListBox'#5'Align'#7#6'alNone'#14'AllowDropFiles'#8#10'AutoScroll'#9#8'A'
+'utoSize'#8#11'BorderIcons'#11#12'biSystemMenu'#10'biMinimize'#10'biMaximize'
+#0#11'BorderStyle'#7#10'bsSizeable'#7'Caption'#6#16'NewProjectDialog'#28'Chi'
+'ldSizing.LeftRightSpacing'#2#0#28'ChildSizing.TopBottomSpacing'#2#0#29'Chil'
+'dSizing.HorizontalSpacing'#2#0#27'ChildSizing.VerticalSpacing'#2#0#27'Child'
+'Sizing.ControlsPerLine'#2#0#12'ClientHeight'#3#240#0#11'ClientWidth'#3#134#1
+#8'DockSite'#8#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9
+#11'Font.Height'#2#0#10'Font.Style'#11#0#9'FormStyle'#7#8'fsNormal'#14'Paren'
+'tBiDiMode'#9#10'ParentFont'#8#8'Position'#7#14'poScreenCenter'#13'ShowInTas'
+'kBar'#7#9'stDefault'#14'UseDockManager'#8#10'LCLVersion'#6#6'0.9.27'#11'Win'
+'dowState'#7#8'wsNormal'#0#7'TBitBtn'#12'CancelButton'#23'AnchorSideRight.Co'
+'ntrol'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBott'
+'om.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3'0'
+#1#6'Height'#2'"'#3'Top'#3#200#0#5'Width'#2'P'#11'HelpContext'#2#0#5'Align'#7
+#6'alNone'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#18'BorderSpa'
+'cing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'Bor'
+'derSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!BorderSpacing.CellAlig'
+'nHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#6
+'Cancel'#9#7'Caption'#6#6'Cancel'#7'Default'#8#7'Enabled'#9#4'Kind'#7#8'bkCa'
+'ncel'#6'Layout'#7#11'blGlyphLeft'#6'Margin'#2#255#11'ModalResult'#2#2#9'Num'
+'Glyphs'#2#0#7'OnClick'#7#17'CancelButtonClick'#10'ParentFont'#9#14'ParentSh'
+'owHint'#9#7'Spacing'#2#3#8'TabOrder'#2#0#7'TabStop'#9#7'Visible'#9#0#0#7'TB'
+'itBtn'#12'CreateButton'#23'AnchorSideRight.Control'#7#12'CancelButton'#24'A'
+'nchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'
+#4'Left'#3#220#0#6'Height'#2' '#3'Top'#3#202#0#5'Width'#2'N'#11'HelpContext'
+#2#0#5'Align'#7#6'alNone'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'
+#9#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Rig'
+'ht'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!BorderSp'
+'acing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'
+#7#7'ccaFill'#6'Cancel'#8#7'Caption'#6#7'&Create'#7'Default'#9#7'Enabled'#9#4
+'Kind'#7#5'bkYes'#6'Layout'#7#11'blGlyphLeft'#6'Margin'#2#255#11'ModalResult'
+#2#6#9'NumGlyphs'#2#0#7'OnClick'#7#17'CreateButtonClick'#10'ParentFont'#9#14
+'ParentShowHint'#9#7'Spacing'#2#3#8'TabOrder'#2#1#7'TabStop'#9#7'Visible'#9#0
+#0#6'TPanel'#6'Panel1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTo'
+'p.Control'#7#5'Owner'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideR'
+'ight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#12'CancelButton'#4
+'Left'#2#6#6'Height'#3#188#0#3'Top'#2#6#5'Width'#3'z'#1#11'HelpContext'#2#0#5
+'Align'#7#6'alNone'#9'Alignment'#7#8'taCenter'#7'Anchors'#11#5'akTop'#6'akLe'
+'ft'#7'akRight'#8'akBottom'#0#8'AutoSize'#8#18'BorderSpacing.Left'#2#0#17'Bo'
+'rderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2
+#0#20'BorderSpacing.Around'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaF'
+'ill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#10'BevelInner'#7#6'bv'
+'None'#10'BevelOuter'#7#6'bvNone'#10'BevelWidth'#2#1#11'BorderWidth'#2#0#11
+'BorderStyle'#7#6'bsNone'#28'ChildSizing.LeftRightSpacing'#2#0#28'ChildSizin'
+'g.TopBottomSpacing'#2#0#29'ChildSizing.HorizontalSpacing'#2#0#27'ChildSizin'
+'g.VerticalSpacing'#2#0#27'ChildSizing.ControlsPerLine'#2#0#12'ClientHeight'
+#3#184#0#11'ClientWidth'#3'v'#1#8'DockSite'#8#10'DragCursor'#7#6'crDrag'#8'D'
+'ragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#11'FullRepaint'
+#9#11'ParentColor'#9#10'ParentFont'#9#14'ParentShowHint'#9#8'TabOrder'#2#2#7
+'TabStop'#8#7'Visible'#9#0#9'TGroupBox'#19'DescriptionGroupBox'#4'Left'#3#170
+#0#6'Height'#3#184#0#3'Top'#2#0#5'Width'#3#204#0#11'HelpContext'#2#0#5'Align'
+#7#8'alClient'#8'AutoSize'#8#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'
+#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpaci'
+'ng.Around'#2#0'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSp'
+'acing.CellAlignVertical'#7#7'ccaFill'#7'Caption'#6#19'DescriptionGroupBox'
+#28'ChildSizing.LeftRightSpacing'#2#0#28'ChildSizing.TopBottomSpacing'#2#0#29
+'ChildSizing.HorizontalSpacing'#2#0#27'ChildSizing.VerticalSpacing'#2#0#27'C'
+'hildSizing.ControlsPerLine'#2#0#12'ClientHeight'#3#165#0#11'ClientWidth'#3
+#200#0#5'Ctl3D'#8#8'DockSite'#8#10'DragCursor'#7#6'crDrag'#8'DragKind'#7#6'd'
+'kDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#14'ParentBidiMode'#9#11'Paren'
+'tColor'#9#11'ParentCtl3D'#9#10'ParentFont'#9#14'ParentShowHint'#9#8'TabOrde'
+'r'#2#0#7'TabStop'#8#7'Visible'#9#0#6'TLabel'#9'HelpLabel'#4'Left'#2#6#6'Hei'
,'ght'#3#153#0#3'Top'#2#6#5'Width'#3#188#0#11'HelpContext'#2#0#5'Align'#7#8'a'
+'lClient'#9'Alignment'#7#13'taLeftJustify'#8'AutoSize'#9#18'BorderSpacing.Le'
+'ft'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpac'
+'ing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!BorderSpacing.CellAlignHorizo'
+'ntal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#7'Capti'
+'on'#6#9'HelpLabel'#10'DragCursor'#7#6'crDrag'#8'DragMode'#7#8'dmManual'#7'E'
+'nabled'#9#6'Layout'#7#5'tlTop'#14'ParentBidiMode'#9#11'ParentColor'#8#10'Pa'
+'rentFont'#9#14'ParentShowHint'#9#13'ShowAccelChar'#9#11'Transparent'#9#7'Vi'
+'sible'#9#8'WordWrap'#9#11'OptimalFill'#8#0#0#0#8'TListBox'#7'ListBox'#4'Lef'
+'t'#2#0#6'Height'#3#184#0#3'Top'#2#0#5'Width'#3#165#0#11'HelpContext'#2#0#5
+'Align'#7#6'alLeft'#7'Anchors'#11#0#18'BorderSpacing.Left'#2#0#17'BorderSpac'
+'ing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'Bo'
+'rderSpacing.Around'#2#0'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31
+'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#11'BorderStyle'#7#8'bsSingle'
+#16'ClickOnSelChange'#9#7'Columns'#2#0#10'DragCursor'#7#6'crDrag'#8'DragKind'
+#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#14'ExtendedSelect'#9#7'Enabled'#9#14
+'IntegralHeight'#8#10'ItemHeight'#2#0#11'MultiSelect'#8#14'ParentBidiMode'#9
+#14'ParentShowHint'#9#10'ParentFont'#9#6'Sorted'#8#5'Style'#7#10'lbStandard'
+#8'TabOrder'#2#1#7'TabStop'#9#8'TopIndex'#2#255#7'Visible'#9#0#0#9'TSplitter'
+#9'Splitter1'#6'Cursor'#7#8'crHSplit'#4'Left'#3#165#0#6'Height'#3#184#0#3'To'
+'p'#2#0#5'Width'#2#5#11'HelpContext'#2#0#5'Align'#7#6'alLeft'#8'AutoSnap'#9#7
+'Beveled'#8#7'MinSize'#2#30#11'ParentColor'#9#14'ParentShowHint'#9#12'Resize'
+'Anchor'#7#6'akLeft'#11'ResizeStyle'#7#8'rsUpdate'#7'Visible'#9#0#0#0#7'TBit'
+'Btn'#10'HelpButton'#22'AnchorSideLeft.Control'#7#5'Owner'#24'AnchorSideBott'
+'om.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#6
+#6'Height'#2'"'#3'Top'#3#200#0#5'Width'#2'B'#11'HelpContext'#2#0#5'Align'#7#6
+'alNone'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#9#18'BorderSpacin'
+'g.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'Border'
+'Spacing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!BorderSpacing.CellAlignHo'
+'rizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#6'C'
+'ancel'#8#7'Caption'#6#5'&Help'#7'Default'#8#7'Enabled'#9#4'Kind'#7#6'bkHelp'
+#6'Layout'#7#11'blGlyphLeft'#6'Margin'#2#255#11'ModalResult'#2#0#9'NumGlyphs'
+#2#0#7'OnClick'#7#15'HelpButtonClick'#10'ParentFont'#9#14'ParentShowHint'#9#7
+'Spacing'#2#3#8'TabOrder'#2#3#7'TabStop'#9#7'Visible'#9#0#0#0
]);

View File

@ -19,7 +19,7 @@
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
* *
***************************************************************************
Abstract:
The new project dialog for lazarus.
@ -32,18 +32,22 @@ interface
uses
Classes, SysUtils, Forms, Graphics, Controls, LResources, Project, Buttons,
StdCtrls, ProjectIntf, ExtCtrls, LazarusIDEStrConsts;
StdCtrls, ProjectIntf, ExtCtrls, LazarusIDEStrConsts, IDEContextHelpEdit;
type
{ TNewProjectDialog }
TNewProjectDialog = class(TForm)
CreateButton: TButton;
CancelButton: TButton;
ListBox: TListBox;
HelpButton: TBitBtn;
CreateButton: TBitBtn;
CancelButton: TBitBtn;
DescriptionGroupBox: TGroupBox;
HelpLabel: TLabel;
NPDBtnPanel: TPanel;
ListBox: TListBox;
Panel1: TPanel;
Splitter1: TSplitter;
procedure HelpButtonClick(Sender: TObject);
procedure CreateButtonClick(Sender:TObject);
procedure CancelButtonClick(Sender:TObject);
procedure ListBoxDblClick(Sender: TObject);
@ -80,9 +84,6 @@ end;
constructor TNewProjectDialog.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Width:=390;
Height:=240;
Position:=poScreenCenter;
Caption:=lisNPCreateANewProject;
SetupComponents;
FillHelpLabel;
@ -111,19 +112,8 @@ end;
procedure TNewProjectDialog.SetupComponents;
var
i: integer;
MaxX, MaxY: integer;
begin
MaxX:=386;
MaxY:=238;
ListBox:=TListBox.Create(Self);
with ListBox do begin
Name:='ListBox';
Left:=5;
Top:=5;
Width:=MaxX-200;
Height:=MaxY-50;
Anchors := [akTop,akLeft,akRight,akBottom];
with Items do begin
BeginUpdate;
for i:=0 to ProjectDescriptors.Count-1 do begin
@ -133,64 +123,16 @@ begin
EndUpdate;
end;
ItemIndex:=0;
OnDblClick:=@ListBoxDblClick;
OnSelectionChange:=@ListBoxSelectionChange;
Parent:=Self;
end;
HelpLabel:=TLabel.Create(Self);
with HelpLabel do begin
Name:='HelpLabel';
Anchors := [akTop,akRight,akBottom];
WordWrap:=true;
Caption:=lisNPSelectAProjectType;
AnchorToCompanion(akLeft,6,ListBox);
AnchorParallel(akRight,6,Parent);
Parent:=Self;
end;
NPDBtnPanel:=TPanel.Create(Self);
with NPDBtnPanel do begin
Name:='NPDBtnPanel';
AutoSize:=true;
Align:=alBottom;
Caption:='';
BevelOuter:=bvNone;
Parent:=Self;
end;
CreateButton:=TButton.Create(Self);
with CreateButton do begin
Name:='CreateButton';
Width:=80;
Height:=23;
Left:=1;
OnClick:=@CreateButtonClick;
Caption:=lisNPCreate;
Default:=true;
AutoSize:=true;
BorderSpacing.Around:=6;
Parent:=NPDBtnPanel;
Align:=alRight;
end;
CancelButton:=TButton.Create(Self);
with CancelButton do begin
Name:='CancelButton';
Width:=80;
Height:=23;
Left:=2;
OnClick:=@CancelButtonClick;
Caption:=dlgCancel;
Cancel:=true;
AutoSize:=true;
BorderSpacing.Around:=6;
Parent:=NPDBtnPanel;
Align:=alRight;
end;
ListBox.AnchorToNeighbour(akBottom,6,NPDBtnPanel);
HelpLabel.AnchorToNeighbour(akBottom,6,NPDBtnPanel);
CancelButton.Caption:=dlgCancel;
CancelButton.LoadGlyphFromLazarusResource('btn_cancel');
CreateButton.Caption:=lisNPCreate;
CreateButton.LoadGlyphFromLazarusResource('btn_ok');
DescriptionGroupBox.Caption := lisToDoLDescription;
HelpButton.LoadGlyphFromLazarusResource('btn_help');
HelpLabel.Caption:=lisNPSelectAProjectType;
end;
procedure TNewProjectDialog.CreateButtonClick(Sender:TObject);
@ -198,6 +140,11 @@ begin
ModalResult:=mrOk;
end;
procedure TNewProjectDialog.HelpButtonClick(Sender: TObject);
begin
ShowContextHelpForIDE(Self);
end;
procedure TNewProjectDialog.CancelButtonClick(Sender:TObject);
begin
ModalResult:=mrCancel;
@ -215,4 +162,8 @@ begin
FillHelpLabel;
end;
initialization
{$I newprojectdlg.lrs}
end.