How To Display a Tkinter Window in Fullscreen
In this tutorial, we are going to see how do I display a Tkinter window in fullscreen in Python. The .attributes() method defines the attributes specific to a platform. The attributes for the Windows platform are:
- -alpha
- -transparentcolor
- -disabled
- -fullscreen
- -toolwindow
- -topmost
-fullscreen specifies if the window is in full screen mode or not.
How To Display a Tkinter Window in Fullscreen
The following example shows the window in full-screen mode, to exit full-screen mode click the escape key.
from tkinter import * root = Tk() root.attributes('-fullscreen', True) root.bind('<Escape>',lambda e: root.destroy()) root.mainloop()