Hiding widgets it Tkinter and shrinking the frame/window? -- the rest of the answer
Russell E. Owen
owen at astrono.junkwashington.emu
Wed Feb 28 11:42:45 EST 2001
Sorry to keep posting, but here's the rest of the answer.
I was wondering why Tk frames wouldn't always shrink when their contents
were unpacked. Turns out that if you remove all widgets from an
enclosing frame, it stays at the size of the last-removed widget. So all
you have to do is include a zero-sized widget (I use a frame with
nothing in it) and never unpack that. Then the enclosing frame will
shrink to nothing when the empty frame is the last widget left in it,
i.e. when all hideable widgets have been unpacked.
We need a Tk folklore site.
More information about the Python-list