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();
beginmyPage:=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;
运行效果