如何在 inno-setup 中更改标题的大小和样式
How to change size and style of a caption in inno-setup
我有 this script(由 TLama 回答)。
我对脚本进行了一些更改,现在我希望标题看起来像下图:
是否可以更改标题的大小和样式(粗体)
Completed
(我从标题 Done
更改了它)。
如何在 inno setup 中更改标题。
谢谢!
这是完全修改过的代码:
[Code]
function GetTickCount: DWORD;
external 'GetTickCount@kernel32.dll stdcall';
var
StartTick: DWORD;
PercentLabel: TNewStaticText;
ElapsedLabel: TNewStaticText;
RemainingLabel: TNewStaticText;
function TicksToStr(Value: DWORD): string;
var
I: DWORD;
Hours, Minutes, Seconds: Integer;
begin
I := Value div 1000;
Seconds := I mod 60;
I := I div 60;
Minutes := I mod 60;
I := I div 60;
Hours := I mod 24;
Result := Format('%.2d:%.2d:%.2d', [Hours, Minutes, Seconds]);
end;
procedure InitializeWizard;
begin
PercentLabel := TNewStaticText.Create(WizardForm);
PercentLabel.Parent := WizardForm.ProgressGauge.Parent;
PercentLabel.Left := 110;
PercentLabel.Top := WizardForm.ProgressGauge.Top +
WizardForm.ProgressGauge.Height + 50;
PercentLabel.Font.Style := [fsBold]
PercentLabel.Font.Size := 14
ElapsedLabel := TNewStaticText.Create(WizardForm);
ElapsedLabel.Parent := WizardForm.ProgressGauge.Parent;
ElapsedLabel.Left := 0;
ElapsedLabel.Top := WizardForm.ProgressGauge.Top +
WizardForm.ProgressGauge.Height + 12;
ElapsedLabel.Font.Style := [fsBold]
RemainingLabel := TNewStaticText.Create(WizardForm);
RemainingLabel.Parent := WizardForm.ProgressGauge.Parent;
RemainingLabel.Left := 270;
RemainingLabel.Top := ElapsedLabel.Top;
RemainingLabel.Font.Style := [fsBold]
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpInstalling then
StartTick := GetTickCount;
end;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
if CurPageID = wpInstalling then
begin
Cancel := False;
if ExitSetupMsgBox then
begin
Cancel := True;
Confirm := False;
PercentLabel.Visible := False;
ElapsedLabel.Visible := False;
RemainingLabel.Visible := False;
end;
end;
end;
我有 this script(由 TLama 回答)。 我对脚本进行了一些更改,现在我希望标题看起来像下图:
是否可以更改标题的大小和样式(粗体)
Completed
(我从标题 Done
更改了它)。
如何在 inno setup 中更改标题。
谢谢!
这是完全修改过的代码:
[Code]
function GetTickCount: DWORD;
external 'GetTickCount@kernel32.dll stdcall';
var
StartTick: DWORD;
PercentLabel: TNewStaticText;
ElapsedLabel: TNewStaticText;
RemainingLabel: TNewStaticText;
function TicksToStr(Value: DWORD): string;
var
I: DWORD;
Hours, Minutes, Seconds: Integer;
begin
I := Value div 1000;
Seconds := I mod 60;
I := I div 60;
Minutes := I mod 60;
I := I div 60;
Hours := I mod 24;
Result := Format('%.2d:%.2d:%.2d', [Hours, Minutes, Seconds]);
end;
procedure InitializeWizard;
begin
PercentLabel := TNewStaticText.Create(WizardForm);
PercentLabel.Parent := WizardForm.ProgressGauge.Parent;
PercentLabel.Left := 110;
PercentLabel.Top := WizardForm.ProgressGauge.Top +
WizardForm.ProgressGauge.Height + 50;
PercentLabel.Font.Style := [fsBold]
PercentLabel.Font.Size := 14
ElapsedLabel := TNewStaticText.Create(WizardForm);
ElapsedLabel.Parent := WizardForm.ProgressGauge.Parent;
ElapsedLabel.Left := 0;
ElapsedLabel.Top := WizardForm.ProgressGauge.Top +
WizardForm.ProgressGauge.Height + 12;
ElapsedLabel.Font.Style := [fsBold]
RemainingLabel := TNewStaticText.Create(WizardForm);
RemainingLabel.Parent := WizardForm.ProgressGauge.Parent;
RemainingLabel.Left := 270;
RemainingLabel.Top := ElapsedLabel.Top;
RemainingLabel.Font.Style := [fsBold]
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpInstalling then
StartTick := GetTickCount;
end;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
if CurPageID = wpInstalling then
begin
Cancel := False;
if ExitSetupMsgBox then
begin
Cancel := True;
Confirm := False;
PercentLabel.Visible := False;
ElapsedLabel.Visible := False;
RemainingLabel.Visible := False;
end;
end;
end;