prevent a Tkinter app from maximizing?
Is it possible to prevent a Tkinter app from being maximized? I'm guessing it would require some kind of WM_xxx protocol , but I don't see reference to anything but WM_DELETE_WINDOW in the tkinter documenatation at pythonware.com. thanks S
The wm_minsize and wm_maxsize methods can set the range of sizes users are permitted to give a particular toplevel. Note that if the window is already bigger or smaller than this, its size is not immediately changed. But when the user attempts to resize it, the minimum and maximum will be enforced. You can also use the wm_resizable method to make the window non-resizable. How setting or removing these flags affects the window's decorations is highly dependant on window manager. On my window manager, only wm_resizable(0,0) removes the maximize button, but wm_maxsize(400,400) makes "maximize" keep the content area of the window only 400x400. I think the behavior on most flavors of Windows is similar to this behavior. Jeff
participants (2)
-
Jeff Epler -
stewart@midtoad.homelinux.org