10.7.3. Class cerebro.gui.ProgressBox¶
-
class
cerebro.gui.ProgressBox(title, min=0, max=100)[source]¶ Parameters: Progress window class.
Methods
close()hide_cancel_button()label()max()min()reset()set_label()set_range()set_title()set_value()show()title()value()was_canceled()
prgbar = cerebro.gui.ProgressBox('Progress Window', 0, 100) prgbar.set_label('Progress...') prgbar.show() for i in range(0,100): if prgbar.was_canceled() == True: # checking if the operation hasn't been canceled by user break prgbar.set_value(i) prgbar.close()
Hides “Cancel” button.
Use this method if you want to prevent users from canceling the operation. If you leave the option to cancel available, you should use the
was_canceled()method in order to know if the “Cancel” button was pressed or not.
-
set_title(title)[source]¶ Parameters: title (string) – window title. Sets a progress window title.
See also