PyDocs

Nav

Graphical user interfaces with Tk

Wm.wm_protocol

tkinter

method of Wm
  • Wm.wm_protocol(name=None, func=None)
Register func as the handler for the window manager protocol name, an atom such as 'WM_DELETE_WINDOW', 'WM_SAVE_YOURSELF' or 'WM_TAKE_FOCUS'; func is then called whenever the window manager sends a message of that protocol. Tk installs a default WM_DELETE_WINDOW handler that destroys the window, which this method can replace. If func is an empty string, the handler is removed. With only name, return the name of its registered handler command, or an empty string if none is set (the default WM_DELETE_WINDOW handler is not reported); with no arguments, return a tuple of the protocols that currently have handlers. wm_protocol() is an alias of protocol().
0 Examples
No examples for tkinter/Wm.wm_protocol.
See Also
No see-alsos for tkinter/Wm.wm_protocol
0 Notes
No notes for Wm.wm_protocol