1

Is is possible to stop a user from minimizing a Python Tkinter window? Or maybe just have a function that checks to see if it is minimized and if it is maximize it again.

So far I can achieve a full screen window with this method

from Tkinter import *

root = Tk()
sw = root.winfo_screenwidth()
sh = root.winfo_screenheight()
root.geometry("%dx%d+0+0" % (sw, sh))
root.mainloop()
Bryan Oakley
  • 341,422
  • 46
  • 489
  • 636
lodkkx
  • 1,143
  • 2
  • 16
  • 28

1 Answers1

2

You can catch the <Unmap> event and deiconify the window :

root.bind("<Unmap>", lambda e: root.deiconify())

You can also prevent your window from being resized :

root.resizable(FALSE,FALSE)
Xion345
  • 1,627
  • 12
  • 25