This topic will cover some details about working with progress bars. How to update the progress and how to respond to changed progress.
To enable a progress bar you need to have either doProgressBar or doProgressBarMarquee set in the DialogOptions property.
Use doProgressBar to display a progress bar that you know the maximum value.
Use doProgressBarMarquee to display a progress bar that has no maximum value. A marquee progress bar never ends, it just keeps cycling the progress bar.
When using the doProgressBar DialogOption there are some extra events that you can handle and methods that need to be called.
To keep track of progress use the OnProgress event. The event includes the current progress bars position in the Position parameter.
To change the position of the progress bar, call the UpdateProgress method. The UpdateProgress method as 3 overloads.
UpdateProgress { no parameters }
Updates the progress bar by the default step amount each time it is called
UpdateProgress(const aPosition: Integer)
Updates the progress bar to the position value specified in the parameter
UpdateProgress(const aPosition, aStep: Integer)
Updates the progress bar to the position value specified and also updates the step value of the progress bar to the value specified in the aStep parameter.
Name |
Description |
One of the advantages of TJSDialog is the ability to use third party controls in place of the controls supplied with the dialog. |
Copyright © 2013 by LMD Innovative. All rights reserved.
|
What do you think about this topic? Send feedback!
|