Michael,

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' ):
                return
                
        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?

Malcolm
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to