How to make full screen Mode in tkinter

PHOTO EMBED

Sat Apr 13 2024 08:57:39 GMT+0000 (Coordinated Universal Time)

Saved by @amramroo ##python #coding #tkinter #gui #python

import tkinter as tk


root = tk.Tk()
root.attributes('-fullscreen', True)

# this is very important
def close_fullscreen():
    root.attributes('-fullscreen', False)

# add bt to close fullscreen mode this is very important
close_bt = tk.Button(root, text='Close full screen mode', command=close_fullscreen)
close_bt.pack(fill=tk.BOTH)

root.mainloop()
content_copyCOPY