[Tkinter-discuss] Removing/disabling a resizable window's maximize button under Windows

python at bdurham.com python at bdurham.com
Thu Dec 2 12:24:20 CET 2010


Here's an updated version of my event handler that restores a window to
its previous size/position when a maximize event is detected. Apparently
all one can do within the <Configure> event is change the state of a
window - changes to a window's geometry (size/position) are ignored.

The following is not a perfect technique - users can still see their
window move to the upper left corner of the display and then return to
its original state.

def onFrmResize( event=None ):
	if not hasattr( event.widget, 'state' ):
	if event.widget.state() == 'zoomed':
		event.widget.state( 'normal' )

I wonder if there's an event that comes *before* <Configure> when a
window is maximized?


More information about the Tkinter-discuss mailing list