I've got a bit of a problem with the tkinter Toplevel widget. Whenever I try to destroy a toplevel window, it won't close, but instead it becomes inactive. Whenever I click the window, which should have been destroyed, I get a memoryaddress error. Does anybody know what I'm doing wrong?
Example code:
from tkinter import *
import _thread as thread
import time
root = Tk()
root.title('root')
login = Toplevel(root)
login.title('login')
thread.start_new_thread(root.mainloop,())
time.sleep(3)
login.destroy()
time.sleep()in asynchronous code. - Scorpion_Goddestroyline, I getRuntimeError: Calling Tcl from different appartment. Seems that Tkinter doesn't play nice with threads in general. - Kevin