Inno Setup – 在页面 wpPreparing 上的星号符号

huangapple go评论47阅读模式
英文:

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.

Inno Setup – 在页面 wpPreparing 上的星号符号

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.

huangapple
  • 本文由 发表于 2023年4月19日 19:15:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/76053856.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定