One Line Progress Meter
Add a progress meter to your application by adding 1 line of code.
one_line_progress_meter
one_line_progress_meter(
title,
current_value,
max_value,
key = "OK for 1 meter",
args = *<1 or N objects>,
orientation = None,
bar_color = (None, None),
button_color = None,
size = (25, 20),
border_width = None,
grab_anywhere = False
)
Parameter Descriptions
Name | Type | Default | Description |
---|---|---|---|
*args | Any | stuff to output | |
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 | width of border around element |
button_color | (str, str) or str | None | button color (foreground, background) |
current_value | int | current value | |
grab_anywhere | bool | False | If True: can grab anywhere to move the window (Default = False) |
key | str or int or tuple or object | OK for 1 meter | Used to differentiate between mutliple meters. Used to cancel meter early. Now optional as there is a default value for single meters |
max_value | int | max value of QuickMeter | |
orientation | str | None | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') |
size | (int, int) | (25, 20) | (w,h) w=characters-wide, h=rows-high (Default value = DEFAULT_PROGRESS_BAR_SIZE) |
title | str | text to display in eleemnt | |
RETURN | bool | True if updated successfully. False if user closed the meter with the X or Cancel button |
one_line_progress_meter_cancel
Cancels and closes a previously created One Line Progress Meter window
Parameter Descriptions
Name | Type | Default | Description |
---|---|---|---|
key | Any | OK for 1 meter | Key used when meter was created |
RETURN | None | None |