1

Is it poosible to hide the buttons for closing a window for the user? The user should not be able to close the window. Is this possible with python tkinter? Thanks!

RisingFlow
  • 11
  • 1

1 Answers1

2

As described here, you can do it by disabling the (x) button with a simple pass.

import tkinter as tk

root=tk.Tk()

def disable_event():
    pass

root.protocol("WM_DELETE_WINDOW", disable_event)

root.mainloop()

Or you could remove the toolbar with root.overrideredirect(True).

Achintha Ihalage
  • 2,310
  • 4
  • 20
  • 33