如何在进度页上显示自定义短信? [英] How to display custom text message on a progress page?

查看:64
本文介绍了如何在进度页上显示自定义短信?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在InnoSetup的进度页上显示自定义文本区域?

在下面的图片中,我标记了我想用一些文本填充的区域(它不介意进度条是否移至底部,而文本区域是否位于其上方):

必须在欢迎页面!(第一页)-(黑色圆圈)上添加自定义消息

解决方案

安装页面的示例:

[CustomMessages]
CustomMessage=This is my custom message! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

[Code]
procedure CurPageChanged(CurPageID: Integer);
var
InstallMessage: TLabel;
begin
  if CurPageID = wpInstalling then begin
    InstallMessage:= TLabel.Create(WizardForm);
    InstallMessage.AutoSize:= False;
    InstallMessage.Top := WizardForm.ProgressGauge.Top + 
     WizardForm.ProgressGauge.Height + ScaleY(8);
    InstallMessage.Height := ScaleY(150);
    InstallMessage.Left := WizardForm.ProgressGauge.Left + ScaleX(0);
    InstallMessage.Width := ScaleX(417);
    InstallMessage.Font:= WizardForm.FilenameLabel.Font;
    InstallMessage.Font.Color:= clBlack;
    InstallMessage.Font.Height:= ScaleY(15);
    InstallMessage.Transparent:= True;
    InstallMessage.WordWrap:= true;
    InstallMessage.Caption:= (ExpandConstant('{cm:CustomMessage}'));
    InstallMessage.Parent:= WizardForm.InstallingPage; 
  end;
end;

准备安装"页面的示例(简单覆盖):

[Messages] 
ReadyLabel2a=Your Custom Ready Label 2a Message. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
ReadyLabel2b=Your Custom Ready Label 2b Message. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

准备安装"页面的示例(自定义消息):

[CustomMessages]
CustomMessage=This is my custom message! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

procedure CurPageChanged(CurPageID: Integer);
var
InstallMessage: TLabel;
begin
  if CurPageID = wpReady then begin
    InstallMessage:= TLabel.Create(WizardForm);
    InstallMessage.AutoSize:= False;
    InstallMessage.Top := WizardForm.ReadyLabel.Top + 
     WizardForm.ReadyLabel.Height + ScaleY(8);
    InstallMessage.Height := ScaleY(150);
    InstallMessage.Left := WizardForm.ReadyLabel.Left + ScaleX(0);
    InstallMessage.Width := ScaleX(417);
    InstallMessage.Font:= WizardForm.ReadyLabel.Font;
    InstallMessage.Font.Color:= clBlack;
    InstallMessage.Font.Height:= ScaleY(15);
    InstallMessage.Transparent:= True;
    InstallMessage.WordWrap:= true;
    InstallMessage.Caption:= (ExpandConstant('{cm:CustomMessage}'));
    InstallMessage.Parent:= WizardForm.ReadyPage; 
  end;
end;

How can I display a custom text area on a progress page in InnoSetup ?

In the following picture I've marked the area which I would like to fill with some text (it wouldn't mind if the progress bar would be moved to bottom and the text area would be placed above it):

The custom message has to be added on the welcome Page !(the first Page) -(Black Circled area)

解决方案

Sample for Installing Page:

[CustomMessages]
CustomMessage=This is my custom message! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

[Code]
procedure CurPageChanged(CurPageID: Integer);
var
InstallMessage: TLabel;
begin
  if CurPageID = wpInstalling then begin
    InstallMessage:= TLabel.Create(WizardForm);
    InstallMessage.AutoSize:= False;
    InstallMessage.Top := WizardForm.ProgressGauge.Top + 
     WizardForm.ProgressGauge.Height + ScaleY(8);
    InstallMessage.Height := ScaleY(150);
    InstallMessage.Left := WizardForm.ProgressGauge.Left + ScaleX(0);
    InstallMessage.Width := ScaleX(417);
    InstallMessage.Font:= WizardForm.FilenameLabel.Font;
    InstallMessage.Font.Color:= clBlack;
    InstallMessage.Font.Height:= ScaleY(15);
    InstallMessage.Transparent:= True;
    InstallMessage.WordWrap:= true;
    InstallMessage.Caption:= (ExpandConstant('{cm:CustomMessage}'));
    InstallMessage.Parent:= WizardForm.InstallingPage; 
  end;
end;

Sample for Ready to Install page (simple override):

[Messages] 
ReadyLabel2a=Your Custom Ready Label 2a Message. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
ReadyLabel2b=Your Custom Ready Label 2b Message. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Sample for Ready to Install page (Custom Message):

[CustomMessages]
CustomMessage=This is my custom message! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

procedure CurPageChanged(CurPageID: Integer);
var
InstallMessage: TLabel;
begin
  if CurPageID = wpReady then begin
    InstallMessage:= TLabel.Create(WizardForm);
    InstallMessage.AutoSize:= False;
    InstallMessage.Top := WizardForm.ReadyLabel.Top + 
     WizardForm.ReadyLabel.Height + ScaleY(8);
    InstallMessage.Height := ScaleY(150);
    InstallMessage.Left := WizardForm.ReadyLabel.Left + ScaleX(0);
    InstallMessage.Width := ScaleX(417);
    InstallMessage.Font:= WizardForm.ReadyLabel.Font;
    InstallMessage.Font.Color:= clBlack;
    InstallMessage.Font.Height:= ScaleY(15);
    InstallMessage.Transparent:= True;
    InstallMessage.WordWrap:= true;
    InstallMessage.Caption:= (ExpandConstant('{cm:CustomMessage}'));
    InstallMessage.Parent:= WizardForm.ReadyPage; 
  end;
end;

这篇关于如何在进度页上显示自定义短信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆