Web Progress Bar
From Xojo Documentation
Contents
ProgressBars are designed to indicate that some function of your application is progressing (hence the name) towards its goal or to show capacity. Unlike Scroll Bars and Sliders, Progress Bars are designed to display a value. They cannot be used for data entry. Also, they appear only in a horizontal orientation.
An Indeterminate Progress Bar has its property set to True. How this Progress Bar displays depends on the browser and OS, but generally a non-specific motion is used to indicate that the app is busy doing something. The Maximum and Value properties are not used.
Commonly used properties are listed below. Refer to WebProgressBar in the Language Reference for the complete list of all events, properties and methods.
Properties
- The Progress Bar displays as indeterminate when True.
- Specifies the maximum value of the Progress Bar.
- The current value of the Progress Bar.
Usage
To update a Progress Bar, you should use a Timer. This code in the Action event handler for a Timer (Mode = Multiple and Period = 500) updates a Progress Bar. When the maximum is reached, the Timer is disabled:
counter = counter + 1
If counter <= ProgressBar1.Maximum Then
ProgressBar1.Value = counter
Else
Me.Enabled = False
End If
The Static keyword declares a variable whose value is remembered between event calls.
Example Project
This ProgressBar example demonstrates using a Progress Bar with a Timer and a Thread and is displays a Progress Wheel while the Thread is running.
Examples/Web/Controls/Progress
See Also
WebProgressBar class; UserGuide:Web UI, UserGuide:Web Progress Wheel, UserGuide:Web Timer topics