ide: choose class section dlg: caption, font

git-svn-id: trunk@51854 -
This commit is contained in:
ondrej 2016-03-08 09:00:36 +00:00
parent 73913a7a9d
commit 8085593af3
3 changed files with 17 additions and 22 deletions

View File

@ -7,21 +7,20 @@ object ChooseClassSectionDialog: TChooseClassSectionDialog
Caption = 'ChooseClassSectionDialog'
ClientHeight = 213
ClientWidth = 304
Color = clBtnFace
KeyPreview = True
OnKeyPress = FormKeyPress
Position = poScreenCenter
LCLVersion = '1.7'
object SectionsListBox: TListBox
Left = 10
Height = 129
Top = 34
Width = 284
Left = 6
Height = 140
Top = 27
Width = 292
Align = alClient
BorderSpacing.Left = 10
BorderSpacing.Top = 10
BorderSpacing.Right = 10
BorderSpacing.Bottom = 10
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
ItemHeight = 0
OnDblClick = SectionsListBoxDblClick
OnKeyPress = SectionsListBoxKeyPress
@ -45,18 +44,15 @@ object ChooseClassSectionDialog: TChooseClassSectionDialog
end
object NewIdentLabel: TLabel
Left = 10
Height = 14
Top = 10
Height = 15
Top = 6
Width = 284
Align = alTop
BorderSpacing.Left = 10
BorderSpacing.Top = 10
BorderSpacing.Top = 6
BorderSpacing.Right = 10
Caption = 'NewIdentLabel'
Font.Height = -11
Font.Name = 'Courier New'
ParentColor = False
ParentFont = False
WordWrap = True
end
end

View File

@ -50,7 +50,7 @@ type
end;
function ChooseClassSectionDialog(const ACaption, ANewIdent: string; ADefault: TInsertClassSectionResult;
function ChooseClassSectionDialog(const ANewIdent: string; ADefault: TInsertClassSectionResult;
out Section: TInsertClassSectionResult): Boolean;
function ShowEventMethodSectionDialog(const ANewIdent: string; out Section: TInsertClassSectionResult): Boolean;
function ShowVarSectionDialog(const ANewIdent: string; out Section: TInsertClassSectionResult): Boolean;
@ -59,14 +59,14 @@ implementation
{$R *.lfm}
function ChooseClassSectionDialog(const ACaption, ANewIdent: string; ADefault: TInsertClassSectionResult;
function ChooseClassSectionDialog(const ANewIdent: string; ADefault: TInsertClassSectionResult;
out Section: TInsertClassSectionResult): Boolean;
var
Dlg: TChooseClassSectionDialog;
begin
Dlg := TChooseClassSectionDialog.Create(Application);
try
Dlg.Caption := ACaption;
Dlg.Caption := lisChooseClassSectionDlgCaption;
if ANewIdent<>'' then
Dlg.NewIdentLabel.Caption := ANewIdent
else
@ -89,7 +89,7 @@ end;
function ShowEventMethodSectionDialog(const ANewIdent: string; out
Section: TInsertClassSectionResult): Boolean;
begin
Result := ChooseClassSectionDialog(lisChooseClassSectionDlgForMethodCaption,
Result := ChooseClassSectionDialog(
ANewIdent, EnvironmentOptions.LastEventMethodSectionPrompt, Section);
if Result then
EnvironmentOptions.LastEventMethodSectionPrompt := Section;
@ -98,7 +98,7 @@ end;
function ShowVarSectionDialog(const ANewIdent: string; out
Section: TInsertClassSectionResult): Boolean;
begin
Result := ChooseClassSectionDialog(lisChooseClassSectionDlgForVariableCaption,
Result := ChooseClassSectionDialog(
ANewIdent, EnvironmentOptions.LastVarSectionPrompt, Section);
if Result then
EnvironmentOptions.LastVarSectionPrompt := Section;

View File

@ -3662,8 +3662,7 @@ resourcestring
lisTheApplicationBundleWasCreatedFor = 'The Application Bundle was created for "%s"';
//codetools ChooseClassSectionDlg
lisChooseClassSectionDlgForMethodCaption = 'Insert new method to section';
lisChooseClassSectionDlgForVariableCaption = 'Insert new variable to section';
lisChooseClassSectionDlgCaption = 'Insert new field to section';
lisEventMethodSectionLabel = 'Insert new event methods to section';
lisVarSectionLabel = 'Insert new object variables to section';