start(), step() & stop() methods of Progressbar

ttk Progressbar methods

Tkinter Progressbar to show status with options and methods to manage and display values

We used one String Variable x with the variable option of Progress bar. So when the value of the progress bar is changed then the tace() method of string variable executes the my_disp() function to display the value.

The start() method triggers the autoincrement of the progress bar and the step() method increases the value of the progress bar by 10.
The stop() method stops the increment of the progress bar.
Full code is here
import tkinter  as tk 
from tkinter import *
from tkinter import ttk
my_w = tk.Tk()

x=tk.StringVar() # variable of Progressbar 

prg1 = ttk.Progressbar(my_w,orient = HORIZONTAL,
              length = 300, mode = 'determinate',variable=x),rely=.3)    


def my_disp(*args): # display the value at Label
l1=tk.Label(my_w,textvariable=x.get(),text='value here',font=font1),rely=0.01)

my_w.mainloop()  # Keep the window open
We used the following methods of progress bar
start( interval )increment the Progress bar in every interval value (50 milliseconds default )
step( amount )Default is 1 if omitted, increments in the progress bar value by given amount
stop()Stop the autoincrement mode.


Options : value, mode ,orient ,variable etc..

Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here

    Python Video Tutorials
    Python SQLite Video Tutorials
    Python MySQL Video Tutorials
    Python Tkinter Video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 All rights reserved worldwide Privacy Policy Disclaimer