2016-05-17 59 views
-1

如何正确更改Inno Setup的StatusLabel颜色?我试过下一选项:Inno Setup:WizardForm.StatusLabel color

procedure CurPageChanged(CurPageID: Integer); 
begin 
    if CurPageID = wpInstalling then 
    begin 
    WizardForm.StatusLabel.Font.Color := $8D7C72; 
    end; 
end; 

procedure CurInstallProgressChanged(CurProgress, MaxProgress: Integer); 
begin 
    WizardForm.StatusLabel.Caption := 'Installing, please wait...'; 
    WizardForm.StatusLabel.Font.Color := $8D7C72; 
end; 

但它并没有帮助。

在下面的屏幕上,我为WizardForm.StatusLabel和自定义百分比标签设置了颜色。但它只适用于第二个。 另外我使用VclStyleInno来设置我的安装程序。 enter image description here

+0

只是一个TLabel,它显示了安装的进度。 –

+0

但是当我关闭vcl styler时,问题仍然是一样的。我使用Inno Setup 5.5.9(u) –

+0

向我们展示样式关闭的截图。 –

回答

0

您的代码(CurPageChanged)适用于我的普通非风格安装程序。

enter image description here

所以它可能打破它的造型。

请注意,StatusLabelTNewStaticText,而不是TLabel。因此,如果TLabel正常工作,只需隐藏StatusLabel,并改为创建另一个自定义TLabel

+0

是的,我认为在我的情况下我会创建自定义标签。 –

0

你使用TLabel或TNewStaticText吗?

前段时间你提到你使用Graphical Installer进行造型(使用VCL样式)。在GI你可以使用新的TEXTCOLOR属性TNewStatictext将覆盖Font.Color颜色性能。

实施例:

URLLabel.TextColor := clRed 

的TLabel没有变化,从而它接受Font.Color颜色

+0

不,我只使用VCLInooSetup,没有GI。 而WizardForm.StatusLabel是TNewStaticText。 –

0

事实证明,我所需要做的就是重新安装Inno Setuup。