Autoresize in Tkinter

Michael Linnemann m.linnemann at
Thu Aug 30 00:33:40 CEST 2001

Am Wed, 29 Aug 2001 14:50:42 +0100 Martin Franklin wrote:

>> Why doesn't the text resize with the frame in this code example?
>> import Tkinter as Tk
>> root = Tk.Tk()
>> t=Tk.Text(root)
>> t.grid(sticky=Tk.NW+Tk.SE)
>> t.insert(Tk.END, "test")
>> root.mainloop()

> I don't use the Tk gridder much perhaps someone else can answer the
> question...
> however using the packer like so :-

root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)

should do the trick.

Seems my investment in "Programming Python' begins to pay off ;-)

More information about the Python-list mailing list