How to stop a progressibar in Tkinter

Asked

Viewed 319 times

0

I have always developed in JS to half lost here in Python, if you can help me...

I wanted to let the button close without an event until the progress bar is finished, and the progress bar at the end is "indeterminate"

    #Loading page

    root = Tk()
    # Titulo da janela 2

    root.title("Carregando aplicação...")
    janela["bg"] = "white"

    # Tamanho da janela default 2

    root.geometry("230x100+500+500")
    progressbar = ttk.Progressbar(root,orient=HORIZONTAL, length=200, mode='determinate')
    progressbar.place(x=15,y=25)

    progressbar.start(50)

    def fechar():
        root.destroy()


    bt_root_close = Button(root,width=20,text="Fechar", command=fechar)
    bt_root_close.pack(side="bottom")

Thank you!

  • just use progressbar.stop()

  • So when I use, I use below Start and this screen starts paused, the bar does not go to the end, you know?

  • Try to disable the button within a bar conditional so Finish bar q the close button will be enabled

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.