它看起来像一个组框控件(在 Delphi/VCL 中称为TGroupBox),而不是斜角。
但组框控件在 Inno Setup 中并未公开。
作为替代方案,只需将 放在 的TLabel顶部即可TBevel。确保将标签的Transparent属性设置为False。
在 Windows Vista 和更新版本中,您还可以在周围添加头发空间作为填充。为此,您需要 Inno Setup 的 Unicode 版本(截至 Inno Setup 6 的唯一版本)。
procedure InitializeWizard;
var
Page: TWizardPage;
Bevel: TBevel;
Caption: TLabel;
begin
Page := CreateCustomPage(wpWelcome, '', '');
Bevel := TBevel.Create(WizardForm);
with Bevel do
begin
Parent := Page.Surface;
Shape := bsFrame;
Left := ScaleX(0);
Top := ScaleY(8);
Width := ScaleX(417);
Height := ScaleY(220);
end;
Caption := TLabel.Create(WizardForm);
with Caption do
begin
Parent := Page.Surface;
Left := Bevel.Left + ScaleX(8);
Top := Bevel.Top - ScaleY(6);
Transparent := False;
Caption := 'Caption';
{ On Vista and newer, add padding using a hair space }
if GetWindowsVersion >= $06000000 then
Caption := #$200A + Caption + #$200A;
end;
end;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2252 次 |
| 最近记录: |