加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

inno-setup – Inno Setup – 页面名称和描述标签中文本下的透明

发布时间:2020-12-15 10:06:11 所属栏目:大数据 来源:网络整理
导读:我希望在这里的文字下制作透明度: 如你所见,我有黑色背景,我不想拥有. 问候. 解决方法 PageNameLabel和PageDescriptionLabel是TNewStaticText组件.此组件不支持透明度.虽然具有类似功能的TLabel组件确实支持透明度( in Unicode version of Inno Setup only)
我希望在这里的文字下制作透明度:

如你所见,我有黑色背景,我不想拥有.

问候.

解决方法

PageNameLabel和PageDescriptionLabel是TNewStaticText组件.此组件不支持透明度.虽然具有类似功能的TLabel组件确实支持透明度( in Unicode version of Inno Setup only).

因此,您可以使用TLabel等效替换这两个组件.然后,您需要确保每当Inno Setup更新原始组件时,您的新自定义组件的标题都会更新.对于这两个组件,这非常简单,因为它们仅在页面更改时才更新.因此,您可以从CurPageChanged event function更新自定义组件.

function CloneStaticTextToLabel(StaticText: TNewStaticText): TLabel;
begin
  Result := TLabel.Create(WizardForm);
  Result.Parent := StaticText.Parent;
  Result.Left := StaticText.Left;
  Result.Top := StaticText.Top;
  Result.Width := StaticText.Width;
  Result.Height := StaticText.Height;
  Result.AutoSize := StaticText.AutoSize;
  Result.ShowAccelChar := StaticText.ShowAccelChar;
  Result.WordWrap := StaticText.WordWrap;
  Result.Font := StaticText.Font;
  StaticText.Visible := False;
end;

var
  PageDescriptionLabel: TLabel;
  PageNameLabel: TLabel;

procedure InitializeWizard();
begin
  { ... }

  { Create TLabel equivalent of standard TNewStaticText components }
  PageNameLabel := CloneStaticTextToLabel(WizardForm.PageNameLabel);
  PageDescriptionLabel := CloneStaticTextToLabel(WizardForm.PageDescriptionLabel);
end;

procedure CurPageChanged(CurPageID: Integer);
begin
  { Update the custom TLabel components from the standard hidden components }
  PageDescriptionLabel.Caption := WizardForm.PageDescriptionLabel.Caption;
  PageNameLabel.Caption := WizardForm.PageNameLabel.Caption;
end;

更简单的方法是更改??原始标签背景颜色:
Inno Setup – Change size of page name and description labels

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读