Python Forum
[Tkinter] tkinter progress bar for decending number
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] tkinter progress bar for decending number
#2
>>> starting_weight = 225
>>> 
>>> def get_progress_value(current_weight):
...     return starting_weight - current_weight
... 
>>> for current_weight in range(225, 217, -1):
...     print(f"Current weight: {current_weight}, Progress bar value: {get_progress_value(current_weight)}")
... 
Current weight: 225, Progress bar value: 0
Current weight: 224, Progress bar value: 1
Current weight: 223, Progress bar value: 2
Current weight: 222, Progress bar value: 3
Current weight: 221, Progress bar value: 4
Current weight: 220, Progress bar value: 5
Current weight: 219, Progress bar value: 6
Current weight: 218, Progress bar value: 7
>>>
Reply


Messages In This Thread
RE: tkinter progress bar for decending number - by Larz60+ - Nov-10-2019, 12:31 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How can I measure progress and display it in the progress bar in the interface? Matgaret 2 5,937 Dec-11-2019, 03:30 PM
Last Post: Denni
  [Tkinter] Progress Bar While Sending an Email maxtimbo 3 4,106 Oct-09-2019, 09:13 PM
Last Post: woooee
  Progress Bar While Sending an Email maxtimbo 0 2,122 Oct-08-2019, 02:13 PM
Last Post: maxtimbo
  [Tkinter] Line Number Tkinter Text Are smabubakkar 1 4,385 Jun-22-2019, 07:05 PM
Last Post: woooee
  GUI Progress Bar Anysja 6 6,628 Aug-29-2018, 02:34 PM
Last Post: swetanjali
  [PyQt] cant import progress bar from another py file swipis 7 8,639 Dec-18-2016, 10:41 AM
Last Post: swipis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020