Two Tkinter questions

Mike Callahan mcalla at insightbb.com
Fri May 17 21:02:36 EDT 2002


Question #1

I want a text widget to completely fill its space. I can do this in tkinter
using the pack geometery manager:
text.pack(fill='both', expand=1)
If I resize the window, the the text widget continues to fill the window,
however if I use grid:
text.grid(sticky='nsew')
the text widget stays the same size if I make the window larger. Can't grid
do the same thing that pack can do?

Question #2

I want to make a horizontal scroll bar scroll two text widgets at the same
time. I know how to connect a scrollbar to a text widget, but is there a way
to connect one scrollbar to two widgets?

Thanks,
Mike Callahan






More information about the Python-list mailing list