Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Closed
@hugodahl

Description

@hugodahl

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions