`
qq173684423
  • 浏览: 26432 次
社区版块
存档分类
最新评论

Inno Setup入门(二十三)——Inno Setup类参考(9)

 
阅读更多

上班挺累的。
今天就简单说一下ProgressBar。

TNewProgressBar = class(TWinControl)
  property Min: Longint; read write;
  property Max: Longint; read write;
  property Position: Longint; read write;
  property State: TNewProgressBarState read write;
  property Style: TNewProgressBarStyle read write;
end

可用TNewProgressBarState 设置状态 (npbsNormal, npbsError, npbsPaused)
使用TNewProgressBarStyle设置风格 (npbstNormal, npbstMarquee)

只贴代码段:
[code]
var
myPage:TWizardPage;
pb1, pb2,pb3:TNewProgressBar;
 
procedure InitializeWizard();
begin
    myPage:=CreateCustomPage(wpWelcome, '标题:自定义页面', '描述:这是我的自定义页面');
    pb1 := TNewProgressBar.Create(mypage);
    pb1.Left:=20;
    pb1.Top:=20;
    pb1.Parent := mypage.Surface;
    pb1.State := npbsError;
    pb1.Position := 25;
 
pb2 := TNewProgressBar.Create(mypage);
pb2.Left:=20;
    pb2.Top:=50;
    pb2.Parent := mypage.Surface;
    pb2.Position := 50;
    
    pb3 := TNewProgressBar.Create(mypage);
pb3.Left:=20;
    pb3.Top:=80;
    pb3.Parent := mypage.Surface;
    pb3.Position := 76;
    {Position设置了也没用}
    pb3.Style:=npbstMarquee;
end;

运行效果:
Inno Setup入门(十一)——完成安装后执行某些程序 - Castor - 趁年轻,多折腾~~
 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics