IDE, Custom application options dialog: fixed localization and made some layout improvements

git-svn-id: trunk@27161 -
This commit is contained in:
maxim 2010-08-21 16:29:37 +00:00
parent aab273e1bf
commit f3ec39b46e
2 changed files with 60 additions and 58 deletions

View File

@ -3,7 +3,6 @@ object CustomApplicationOptionsForm: TCustomApplicationOptionsForm
Height = 290
Top = 242
Width = 460
ActiveControl = EClassName
BorderIcons = [biSystemMenu]
BorderStyle = bsDialog
Caption = 'New console application'
@ -11,53 +10,68 @@ object CustomApplicationOptionsForm: TCustomApplicationOptionsForm
ClientWidth = 460
OnCreate = FormCreate
Position = poScreenCenter
LCLVersion = '0.9.27'
LCLVersion = '0.9.29'
object LEClassName: TLabel
Left = 8
Height = 23
Top = 8
Width = 227
AnchorSideTop.Control = EClassName
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = EClassName
Left = 127
Height = 14
Top = 9
Width = 108
Alignment = taRightJustify
AutoSize = False
Anchors = [akTop, akRight]
BorderSpacing.Right = 6
Caption = '&Application class name'
FocusControl = EClassName
Layout = tlCenter
ParentColor = False
end
object LETitle: TLabel
Left = 8
Height = 23
Top = 38
Width = 227
AnchorSideTop.Control = ETitle
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = ETitle
Left = 213
Height = 14
Top = 42
Width = 21
Alignment = taRightJustify
AutoSize = False
Anchors = [akTop, akRight]
BorderSpacing.Right = 6
Caption = '&Title'
FocusControl = ETitle
Layout = tlCenter
ParentColor = False
end
object EClassName: TEdit
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 241
Height = 23
Top = 8
Height = 21
Top = 6
Width = 213
Anchors = [akTop, akLeft, akRight]
AutoSelect = True
BorderSpacing.Around = 6
OnKeyPress = EClassNameKeyPress
TabOrder = 0
Text = 'TMyApplication'
end
object CGOptions: TCheckGroup
Left = 8
Height = 181
Top = 72
Width = 443
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = ETitle
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ButtonPanel
Left = 6
Height = 186
Top = 66
Width = 448
Anchors = [akTop, akLeft, akRight, akBottom]
AutoFill = True
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Code generation options'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
@ -70,51 +84,37 @@ object CustomApplicationOptionsForm: TCustomApplicationOptionsForm
TabOrder = 2
end
object ETitle: TEdit
AnchorSideTop.Control = EClassName
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 240
Height = 23
Top = 38
Height = 21
Top = 39
Width = 214
Anchors = [akTop, akLeft, akRight]
AutoSelect = True
BorderSpacing.Top = 6
BorderSpacing.Around = 6
TabOrder = 1
Text = 'My Application'
end
object BOK: TBitBtn
AnchorSideRight.Control = BCancel
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 298
Height = 25
Top = 259
Width = 75
Anchors = [akRight, akBottom]
BorderSpacing.Around = 6
Caption = '&OK'
Default = True
Kind = bkOK
ModalResult = 1
NumGlyphs = 0
object ButtonPanel: TButtonPanel
Left = 6
Height = 26
Top = 258
Width = 448
OKButton.Name = 'OKButton'
OKButton.Caption = '&OK'
HelpButton.Name = 'HelpButton'
HelpButton.Caption = '&Help'
HelpButton.Enabled = False
CloseButton.Name = 'CloseButton'
CloseButton.Caption = '&Close'
CloseButton.Enabled = False
CancelButton.Name = 'CancelButton'
CancelButton.Caption = 'Cancel'
TabOrder = 3
end
object BCancel: TBitBtn
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 379
Height = 25
Top = 259
Width = 75
Anchors = [akRight, akBottom]
BorderSpacing.Around = 6
Cancel = True
Caption = 'Cancel'
Kind = bkCancel
ModalResult = 2
NumGlyphs = 0
TabOrder = 4
ShowButtons = [pbOK, pbCancel]
ShowBevel = False
end
end

View File

@ -38,7 +38,7 @@ interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls,
ExtCtrls, Buttons,
ExtCtrls, Buttons,ButtonPanel,
LazarusIDEStrConsts;
type
@ -46,8 +46,7 @@ type
{ TCustomApplicationOptionsForm }
TCustomApplicationOptionsForm = class(TForm)
BCancel: TBitBtn;
BOK: TBitBtn;
ButtonPanel:TButtonPanel;
CGOptions: TCheckGroup;
EClassName: TEdit;
ETitle: TEdit;
@ -114,6 +113,9 @@ begin
CGOptions.Items.Add(lisDestructorCode);
CGOptions.Items.Add(lisCheckOptions);
ButtonPanel.OKButton.Caption:=lisOk;
ButtonPanel.CancelButton.Caption:=dlgCancel;
// set all defaults to true
for i:=0 to CGOptions.Items.Count-1 do
CGOptions.Checked[i]:= true;