[Tkinter-discuss] How do you get your application to open up with a specific, static siz e?

Jeff Epler jepler at unpythonic.net
Fri Mar 26 09:35:58 EST 2004


Michael Lange's advice to use pack_propagate(0) is good.

You might also want to look at .wm_minsize() and .wm_maxsize(), which
can set the minimum and maximum sizes for a toplevel window.  Note that
if a window's current size is (say) 100x100 and you call
wm_minsize(200,200) the size won't change.  But if the user starts a
resize operation, the window will jump to 200x200.  (at least, this is
my experience on Linux)

On Windows with tk8.3 and newer you can use .wm_state("zoomed") on a
toplevel window to start maximized.

Jeff



More information about the Tkinter-discuss mailing list