Skip to content
Advertisement

I want to create a back button in a tkinter program to recreate a filled form. How do I reopen a withdrawn root window?

Is there a way I can reopen a withdrawn window? I know it is impossible with the destroy function, but I would imagine it would be possible to do so after using the the withdraw function.

I created a root1 loop and a root2 loop which opens after the root1 is closed. I have a back button on the second window, and I am trying to figure out a command which will reopen the first window with a entry field still filled.

Advertisement

Answer

Is there a way I can reopen a withdrawn window?

You do that by calling the deiconify method.

root = tk.Tk()
root.withdraw()
...
root.deiconify()
1 People found this is helpful
Advertisement