def myfun(): print("Close Disable") root.protocol('WM_DELETE_WINDOW',myfun) # Disable All Button Like Close, minimize, maximum root.attributes('-disabled', True)