Back to the index of articles and examples

Progress Bar examples - Pop Up

This example shows a ProgressBar in a pop up window.

The ProgressBar itself is created with this code:

Most of the code in this example deals with doing the animation. In the end, it all involves showing, hiding and changing the value for the bar. We use an interval timer to move the bar a random amount every half a second, hide it when it reaches the top, wait for a couple of seconds and show it again, over and over again.