How to catch the maximize signal in Tk?
问题 You can bind a command with the X button of the window by this: wm protocol $windowPath WM_DELETE_WINDOW $command How can I do the same for the maximize button of the window? 回答1: There's no standard protocol for it, either among the X11 ICCCM set or the FreeDesktop set. As such, wm protocol cannot possibly be used for it. However, you can use the <Configure> event to track all size changes for a window. Note that if you set it on a toplevel, you will also get notifications for all widgets