Answers for "python tkinter how to wait until a button has been pressed"

0

how to wait until pressing button in tkinter

import tkinter as tk
root = tk.Tk()
...
var = tk.IntVar()
button = tk.Button(root, text="Click Me", command=lambda: var.set(1))
button.place(relx=.5, rely=.5, anchor="c")

print("waiting...")
button.wait_variable(var)
print("done waiting.")
Posted by: Guest on December-13-2019

Code answers related to "python tkinter how to wait until a button has been pressed"

Python Answers by Framework

Browse Popular Code Answers by Language