英文:
Inno setup - star symbol on page wpPreparing
问题
在 wpPreparing
步骤中,我有一个星号符号。
但是星号符号在 ISL 文件或 [CustomMessages]
部分中不存在。
我已经在 CurStepChanged
中添加了日志:
log('CurStepChanged - CurStep: ' + IntToStr(CurStep));
log('CurStepChanged - Label: ' + WizardForm.StatusLabel.Caption);
log('CurStepChanged - Label visible: ' + BoolToStr(WizardForm.StatusLabel.Visible));
以及在 CurPageChanged
中:
log('CurPageChanged - CurPage: ' + IntToStr(CurPage));
log('CurPageChanged - Label: ' + WizardForm.StatusLabel.Caption);
log('CurPageChanged - Label visible: ' + BoolToStr(WizardForm.StatusLabel.Visible));
但仍然无法确定正确的元素。
这个星号符号是从哪里来的?我想用自定义消息替换它。
英文:
On wpPreparing
I've a star symbol.
However the star symbol does not exist in ISL files or in [CustomMessages]
sestion.
I've added logging to CurStepChanged
:
log('CurStepChanged - CurStep: ' + IntToStr(CurStep));
log('CurStepChanged - Label: ' + WizardForm.StatusLabel.Caption);
log('CurStepChanged - Label visible: ' + BoolToStr(WizardForm.StatusLabel.Visible));
and to CurPageChanged
:
log('CurPageChanged - CurPage: ' + IntToStr(CurPage));
log('CurPageChanged - Label: ' + WizardForm.StatusLabel.Caption);
log('CurPageChanged - Label visible: ' + BoolToStr(WizardForm.StatusLabel.Visible));
But still not able to identify the right element.
Whare does the star come from? I want to replace it with custom message.
答案1
得分: 1
Sure, here's the translated code:
Gotcha,这是`WizardForm.PreparingLabel`:
procedure CurPageChanged(CurPage: Integer);
var RichViewer: TRichEditViewer;
begin
log('CurPageChanged - 当前页:' + IntToStr(CurPage));
log('CurPageChanged - 准备标签:' + WizardForm.PreparingLabel.Caption);
log('CurPageChanged - 准备标签可见性:' + BoolToStr(WizardForm.PreparingLabel.Visible));
...
log:
2023-04-19 14:13:20.254 CurPageChanged - 当前页:11
2023-04-19 14:13:20.254 CurPageChanged - 准备标签:*
2023-04-19 14:13:20.254 CurPageChanged - 准备标签可见性:True
解决方法:
procedure CurPageChanged(CurPage: Integer);
begin
if CurPage = wpPreparing then
begin
WizardForm.PreparingLabel.Caption := CustomMessage('Preparing');
end;
end;
使用自定义消息:
[CustomMessages]
Czech.Preparing=Probíhá příprava instalace, čekejte prosím.
Slovak.Preparing=Prebieha príprava inštalácie, čakajte prosím.
If you need any further assistance, please let me know.
英文:
Gotcha, it's WizardForm.PreparingLabel
:
procedure CurPageChanged(CurPage: Integer);
var RichViewer: TRichEditViewer;
begin
log('CurPageChanged - CurPage: ' + IntToStr(CurPage));
log('CurPageChanged - PreparingLabel: ' + WizardForm.PreparingLabel.Caption);
log('CurPageChanged - PreparingLabel visible: ' + BoolToStr(WizardForm.PreparingLabel.Visible));
...
log:
2023-04-19 14:13:20.254 CurPageChanged - CurPage: 11
2023-04-19 14:13:20.254 CurPageChanged - PreparingLabel: *
2023-04-19 14:13:20.254 CurPageChanged - PreparingLabel visible: True
Solved with:
procedure CurPageChanged(CurPage: Integer);
begin
if CurPage = wpPreparing then
begin
WizardForm.PreparingLabel.Caption := CustomMessage('Preparing');
end;
end;
with custom message:
[CustomMessages]
Czech.Preparing=Probíhá příprava instalace, čekejte prosím.
Slovak.Preparing=Prebieha príprava inštalácie, čakajte prosím.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论