ProgressBar Control available in REALbasic is a great tool to show a progress of some action in visual way. You can see this control for example in browsers on loading page, when you are coping a file in your system or extracting a document etc.
If we like change a ProgressBar Control value to 50% we simply use this code. The default ProgressBar.Maximum is 100 so a half from this is 50.
1 | ProgressBar1.Value = 50 |
More practical example for using ProgressBar Control is displaying a page load progress from HTMLViewer control. To do this go to code editor and in HTMLViewer Sub DocumentProgressChanged (URL As String, percentageComplete As Integer) enter:
1 | ProgressBar1.Value = percentageComplete |
To display a barber pole set the maximum property to 0.
1 | ProgressBar1.Maximum = 0 |