Web Progress Bar

From Xojo Documentation

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.



The Progress Bar displays as indeterminate when True.


Specifies the maximum value of the Progress Bar.


The current value of the Progress Bar.


Web Progress Bar and Web Progress Wheel

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:

Static counter As Integer
counter = counter + 1
If counter <= ProgressBar1.Maximum Then
ProgressBar1.Value = counter
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.


See Also

WebProgressBar class; UserGuide:Web UI, UserGuide:Web Progress Wheel, UserGuide:Web Timer topics