ProgressBar
Progress Bar Element - Displays a colored bar that is shaded as progress of some operation is made
ProgressBar(
max_value,
orientation = None,
size = (None, None),
start_value = 0,
auto_size_text = None,
bar_color = (None, None),
style = None,
border_width = None,
relief = None,
key = None,
pad = None,
disabled = False,
visible = True,
size_px = (None, None)
)
Parameter Descriptions
Name | Type | Default | Description |
---|---|---|---|
auto_size_text | bool | None | Not sure why this is here |
bar_color | (str, str) or str | (None, None) | The 2 colors that make up a progress bar. Either a tuple of 2 strings or a string. Tuple - (bar, background). A string with 1 color changes the background of the bar only. A string with 2 colors separated by "on" like "red on blue" specifies a red bar on a blue background. |
border_width | int | None | The amount of pixels that go around the outside of the bar |
disabled | bool | False | disable or enable state of the element |
key | str or int or tuple or object | None | Used with window.find_element and with return values to uniquely identify this element to uniquely identify this element |
max_value | int | max value of progressbar | |
orientation | str | None | 'horizontal' or 'vertical' |
pad | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | None | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
relief | str | None | relief style. Values are same as progress meter relief values. Can be a constant or a string: RELIEF_RAISED RELIEF_SUNKEN RELIEF_FLAT RELIEF_RIDGE RELIEF_GROOVE RELIEF_SOLID (Default value = DEFAULT_PROGRESS_BAR_RELIEF) |
size | (int, int) or (int, None) | (None, None) | Size of the bar. If horizontal (chars long, pixels wide), vert (chars high, pixels wide). Vert height measured using horizontal chars units. |
size_px | (int, int) or (None, None) | (None, None) | Size in pixels (length, width). Will be used in place of size parm if specified |
style | str | None | Progress bar style defined as one of these 'default', 'winnative', 'clam', 'alt', 'classic', 'vista', 'xpnative' |
visible | bool | True | set visibility state of the element |
Class Properties
This class has no public properties
Class Methods
def update
def update_bar
update
Changes some of the settings for the ProgressBar Element. Must call Window.Read
or Window.Finalize
prior
Changes will not be visible in your window until you call window.read or window.refresh.
If you change visibility, your element may MOVE.
Parameter Descriptions
Name | Type | Default | Description |
---|---|---|---|
visible | bool | None | control visibility of element |
update_bar
Change what the bar shows by changing the current count and optionally the max count
Parameter Descriptions
Name | Type | Default | Description |
---|---|---|---|
current_count | int | sets the current value | |
max | int | None | changes the max value |