Maptitude GISDK Help |
Updates a progress bar in the progress window.
interrupted = UpdateProgressBar(string activity, integer percentage)
Argument |
Contents |
activity |
The text displayed with the progress bar, that indicates what is progressing |
percentage |
The completion percentage indicated in the progress bar |
The string "True" if the user has pressed the cancel button since the most recent progress bar update; the string "False" if the cancel button has not been pressed.
UpdateProgressBar() must be preceded by a call to CreateProgressBar().
UpdateProgressBar() only updates the most recently created progress bar that has not been destroyed.
UpdateProgressBar() can be called without harm when the progress window is disabled and when the progress window contains the maximum allowable number of progress bars.
SetProgressWindow("Status", 1) // Allow only a single progress bar
CreateProgressBar("Calculating...", "True")
for i = 1 to 100 do
stat = UpdateProgressBar("Step Number " + String(i), i)
if stat = "True" then do
ShowMessage("You Quit!")
goto quit_loop
end
x = x + i * i // The meat of this loop
end
quit_loop:
DestroyProgressBar()
ResetProgressWindow() // Return to previous maximum number of progress bars
Error Type |
Meaning |
Error |
There was no preceding call to CreateProgressBar() |
Function |
Summary |
Creates a new progress bar that reports the progress of an operation |
|
Destroys a progress bar, indicating completion of an operation |
|
Resets the title and the maximum number of progress bars that can be created in the progress window to the number prior to the last call to SetProgressWindow() |
|
Sets the title and the maximum number of progress bars that can be created in the progress window |
©2025 Caliper Corporation | www.caliper.com |