Autoresize in Tkinter
Martin Franklin
martin.franklin at westerngeco.com
Wed Aug 29 09:50:42 EDT 2001
Jonas Bengtsson 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()
>
> /Jonas B
I don't use the Tk gridder much perhaps someone else can answer the
question...
however using the packer like so :-
import Tkinter as Tk
root = Tk.Tk()
t=Tk.Text(root)
t.pack(fill='both', expand='yes')
t.insert('end', "test")
root.mainloop()
works......
Martin.
More information about the Python-list
mailing list