How can I make a frame in Tkinter display in fullscreen mode? I saw this code, and it’s very useful…:
>>> import Tkinter
>>> root = Tkinter.Tk()
>>> root.overrideredirect(True)
>>> root.geometry("{0}x{1}+0+0".format(root.winfo_screenwidth(), root.winfo_screenheight()))
…but is it possible to edit the code so that hitting Esc automatically makes the window “Restore down”?
This creates a fullscreen window. Pressing
Escaperesizes the window to ‘200×200+0+0’ by default. If you move or resize the window,Escapetoggles between the current geometry and the previous geometry.