Skip to content

Add ability to use "full" values rather than float #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hugodahl opened this issue Feb 2, 2021 · 1 comment
Closed

Add ability to use "full" values rather than float #23

hugodahl opened this issue Feb 2, 2021 · 1 comment

Comments

@hugodahl
Copy link
Contributor

hugodahl commented Feb 2, 2021

To make using the progress bar easier for users, it would be nice to have the ability to specify a minimum and maximum value for the control (which represent the values 0% and 100%). This would remove the need to compute the percentage from the user, particularly when their range values don't neatly fit in a 0..1, 0..10, 0..100 and other such "easy" ranges.

Example

progress_bar = ProgressBar(..., min=20, max=50, ...)

# Some work happens . . . 

# Update the progress bar to the new value...
progress_bar.progress = 22  # Let the control figure out "6.67%"

progress_bar.max = 60  # This would NOT be valid. "min" and "max" are fixed at initialization
@hugodahl
Copy link
Contributor Author

This will be addressed as part of the changes in #21

The property name for the value will be more instinctive as value. Setting it would then look like

progress_bar = ProgressBar(..., min=20, max=50, ...)

# Some work happens . . . 

# Update the progress bar to the new value...
progress_bar.progress = 42  # Let the control figure out "73.33%"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant