0

I want a python code to show a loading wheel or something on count down, currentry i'm using 3.2.1... count down but i want something like a loading wheel

    def button1Clicked():
        print("button was clicked")
        exitButton.pack_forget()
        startButton.pack_forget()
        start1Button.pack_forget()
        take1Photo(1)

def takePhoto(snap):
    if snap > 0:
        countdown(3)
        win.after(10000, takePhoto, snap-1)
    else:
        label["text"] = "Please wait..."
        win.after(100, assAndPrint)

def take1Photo(snap):
    if snap > 0:
        countdown(3)
        win.after(10000, take1Photo, snap-1)
    else:
        label["text"] = "Please wait..."
        win.after(100, assAndPrint1) 
Rolf of Saxony
  • 21,661
  • 5
  • 39
  • 60
joe munapo
  • 15
  • 2
  • 6
  • 1
    Possible duplicate of [How to create downloading progress bar in ttk?](https://stackoverflow.com/questions/7310511/how-to-create-downloading-progress-bar-in-ttk) – Rolf of Saxony Aug 26 '17 at 15:35

1 Answers1

1

Assuming "root" is your Tk Window, here's the simplest example on how you could do it :

p = Progressbar(root,orient=HORIZONTAL,length=200,mode="determinate",takefocus=True,maximum=100)
p.pack()            
for i in range(100):                
    p.step()            
    root.update()

Don't forget to import Progressbar :

from tkinter.ttk import Progressbar
TmZn
  • 399
  • 5
  • 16