mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Allow floating point values in ProgressBar.
This commit is contained in:
parent
b46bebf518
commit
52fbe5330b
1 changed files with 2 additions and 0 deletions
|
@ -290,6 +290,8 @@ class ProgressBar:
|
|||
if maxval > 32767:
|
||||
value = int(value/(maxval/32767.0))
|
||||
maxval = 32767
|
||||
maxval = int(maxval)
|
||||
value = int(value)
|
||||
progbar = self.d.GetDialogItemAsControl(3)
|
||||
progbar.SetControlMaximum(maxval)
|
||||
progbar.SetControlValue(value) # set the bar length
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue