2016-12-15 21 views

回答

0

这看起来像一个group box control(已知为在Delphi/VCL的TGroupBox),而不是斜面。

但组框控件没有在Inno Setup的暴露。

作为替代方案,只是放置一个TLabelTBevel的顶部。确保将标签的Transparent属性设置为False

在Windows Vista和较新的,你还可以添加hair space周围的填充。你需要使用Unicode版本的Inno Setup(但你仍然应该使用它)。

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; 

enter image description here

+0

感谢你非常玉米粥马丁Prikryl –

+0

欢迎您。虽然在堆栈溢出我们[感谢接受答案](http://stackoverflow.com/help/someone-answers)。 –