1

When i add custom mesage enter link description here do not show percent onli name. How to show percent.

This is my setings

[CustomMessages]
Done=Завршено


procedure CurInstallProgressChanged(CurProgress, MaxProgress: Integer);
var
  CurTick: DWORD;
begin
  CurTick := GetTickCount;
  PercentLabel.Caption :=ExpandConstant('{cm:Done}');
    Format('Done: %.2f %%', [(CurProgress * 100.0) / MaxProgress]);
Community
  • 1
  • 1
  • Define your custom message even with the format like e.g. `Done=Done %.2f %%` and in code then use `PercentLabel.Caption := Format(ExpandConstant('{cm:Done}'), [(CurProgress * 100.0) / MaxProgress]);`. – TLama May 01 '14 at 22:13
  • @TLama: This would be a perfect addition to your answer http://stackoverflow.com/a/20092780/30568 (and this question could be deleted). – mghie May 03 '14 at 11:13
  • @mghie, that's a good point, however I'm using constants in script samples intentionally to make the code more readable. It's somehow worse to read `ExpandConstant`s with `{cm:}`s without seeing the string values that are going to be formatted. Hence I would keep being lazy and let it be as it is :-) – TLama May 03 '14 at 17:59

0 Answers0