Tkinter: why does an empty frame not shrink?
gregm at iname.com
Fri Jun 25 08:29:38 CEST 1999
If you have several child widgets packed in a frame and you unpack the
children one by one, the frame will gradually get smaller, except when
the last child is unpacked, in which case the frame does not resize.
Does anyone know why the frame does not shrink to 0x0 when you unpack
the last child? Any soluton?
root = Tkinter.Tk()
frame = Tkinter.Frame(background = 'red')
frame.pack(fill = 'x')
for i in range(5):
button = Tkinter.Button(frame, text = 'Unpack me')
button.configure(command = button.pack_forget)
Greg McFarlane: INMS Telstra Australia (gregm at iname.com)
Today's forecast: Sunny, with occasional cloudy periods and a chance
of precipitation in some areas.
More information about the Python-list