在Inno Setup中,FinishedPage上未显示自定义TLabel [英] Custom TLabel not displaying on FinishedPage in Inno Setup

查看:103
本文介绍了在Inno Setup中,FinishedPage上未显示自定义TLabel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我肯定在这里缺少明显的东西.我正在尝试在wpFinished上添加指向发行说明的链接,但似乎无法使其显示出来:

I must be missing something obvious here. I'm trying to add a link to the release notes onto wpFinished but can't seem to make it show up:

我有一个文件finishedPage.iss,我通过#include "InnoDialogs\finishedPage.iss";包含了该文件 该文件具有以下内容:

I have a file finishedPage.iss which I include via #include "InnoDialogs\finishedPage.iss"; The file has the following content:

[Run]
Filename: "{app}\bin\{#MyAppExeName}"; \
    Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; \
    Flags: nowait postinstall skipifsilen

[Code]
{ procedures to deal with page interaction }
procedure ReleaseNotesClick(Sender: TObject);
var
    errorCode: Integer;
begin
    ShellExec('','https://myUrl.com/Release_Notes', '', '', SW_SHOW, ewNoWait, errorCode)
end;

{ build the page }
procedure FinishedPage_Create;
var
    ReleaseNotesLink: TLabel;

begin

    ReleaseNotesLink := TLabel.Create(WizardForm);
    ReleaseNotesLink.Parent := WizardForm.FinishedPage;
    ReleaseNotesLink.Caption := 'Read the Releasenotes';
    ReleaseNotesLink.Enabled := True;
    ReleaseNotesLink.Visible := True;
    ReleaseNotesLink.AutoSize := True;
    ReleaseNotesLink.Left := WizardForm.FinishedLabel.Left;
    ReleaseNotesLink.Top := WizardForm.FinishedLabel.Top + ScaleY(100);
    ReleaseNotesLink.OnClick := @ReleaseNotesClick;
    ReleaseNotesLink.ParentFont := True;
    ReleaseNotesLink.Font.Style := ReleaseNotesLink.Font.Style + [fsUnderline, fsBold];
    ReleaseNotesLink.Font.Color := clBlue;
    ReleaseNotesLink.Cursor := crHand;

end;

在主安装程序文件的CurPageChanged过程中,我具有:

In the CurPageChanged procedure in my main installer file I have:

procedure CurPageChanged(CurPageID: Integer);
begin
    if CurPageID = wpFinished then
        begin
            FinishedPage_Create();
        end;
end;

这可以正常编译,但是我无法显示出来.我也尝试过不同的位置,以为它可能只是被其他东西吸引了.我正在使用相同的步骤将元素添加到其他页面...

This compiles just fine, but I can't make it show up. I tried different positions as well, thinking perhaps it's just drawn behind something else. I'm using the same procedure for adding elements to other pages...

有什么想法我想念的吗?

Any ideas what I'm missing?

推荐答案

您的标签隐藏在RunList的后面,该标签占据了页面的其余部分.

Your label is hidden behind the RunList, which occupies the rest of the page.

您必须缩小列表.例如:

You have to shrink the list. For example:

WizardForm.RunList.Height := ScaleY(24);

ReleaseNotesLink.Left := WizardForm.RunList.Left;
ReleaseNotesLink.Top := WizardForm.RunList.Top + WizardForm.RunList.Height + ScaleY(8);

这篇关于在Inno Setup中,FinishedPage上未显示自定义TLabel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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