ProgressBar objects provide support for modeless progress-bar dialogs. Both determinate (thermometer style) and indeterminate (barber-pole style) progress bars are supported. The bar will be determinate if its maximum value is greater than zero; otherwise it will be indeterminate. Modificato nella versione 2.2: Support for indeterminate-style progress bars was added.
The dialog is displayed immediately after creation. If the dialog's ``Cancel'' button is pressed, or if Cmd-. or ESC is typed, the dialog window is hidden and KeyboardInterrupt is raised (but note that this response does not occur until the progress bar is next updated, typically via a call to inc() or set()). Otherwise, the bar remains visible until the ProgressBar object is discarded.
ProgressBar objects possess the following attributes and methods:
0and maxval. This attribute should not be altered directly.
0, the bar will be indeterminate (barber-pole). This attribute should not be altered directly.
1if n is not provided. (Note that n may be negative, in which case the effect is a decrement.) The progress bar is updated to reflect the change. If the bar is indeterminate, this causes one ``spin'' of the barber pole. The resulting curval is coerced between 0 and maxval if incrementing causes it to fall outside this range.