Class: cProgressBar
Properties | Events | Methods | Index of Classes
Indicates the progress within a range
Hierarchy
cObject > cUIObject > DfBaseObject > DfBaseWindow > DfBaseUIWindow > DfBaseControl > cWinControl > cProgressBar
Show full hierarchy and direct subclasses
Library: Windows Application Class Library
Package: cProgressBar.pkg
Mixins: ToolTip_Support_Mixin
Description
A typical usage might be to show the progress being made through a batch process of record updates.
You set the range of the progress with piMinimum and piMaximum. The actual position within the range is governed by the piPosition property, which you can set manually, or automatically by sending either the DoAdvance or DoAdvanceBy methods.
The position is indicated with a bar that is drawn to reflect the percentage of completion. The bar can be drawn vertically or horizontally, using the pbVertical property, and it can be drawn segmented or smooth by using the pbSmooth property.
The color of the bar is controlled by the piBarColor property and the color of the background with the piBackColor property.
Sample
Use cProgressBar.pkg
Object oProgressBar is a cProgressBar
Set Size To 14 60
Set Location to 30 30
Set piMinimum To 0
Set piMaximum To 100
End_Object
Object oProgressButton is a Button
Procedure OnClick
// increment piPosition by piAdvanceBy
Send DoAdvance of oProgressBar
End_Procedure
End_Object
Object oProgressByButton is a Button
Procedure OnClick
// increment piPosition by 5
Send DoAdvanceBy of oProgressBar 5
End_Procedure
End_Object
See Also