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),
auto_size_text = None,
bar_color = (None, None),
style = None,
border_width = None,
relief = None,
key = None,
pad = 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 |
| 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) | 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. |
| style | str | None | Progress bar style defined as one of these 'default', 'winnative', 'clam', 'alt', 'classic', 'vista', 'xpnative' |
Class Properties
This class has no public properties
Class Methods
def update
def update_bar
update
Updates the element
update(
widget,
background_color = None,
text_color = None,
font = None,
visible = None,
disabled = None,
tooltip = None
)
Parameter Descriptions
| Name | Type | Default | Description |
|---|---|---|---|
| background_color | str | None | color of background. Can be in #RRGGBB format or a color name "black" |
| disabled | bool | None | Is the element disabled |
| font | (str or (str, int[, str]) or None) | None | specifies the font family, size. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| text_color | None | Text color | |
| tooltip | None | Tooltip to be shown | |
| visible | bool | None | Is the element visible |
| widget | The widget to be updated |
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 |