Tkinter Canvas/Grid question

Jeff Epler jepler at unpythonic.net
Fri Sep 12 08:21:17 EDT 2003


> "Gary Richardson" <garyr at fidalgo.net>
> > Michael, Jeff,
> >
> > Thanks for your replies. I made the changes indicated above and the
> resizing
> > works just fine now. I'm still puzzled as to why pack() would be used with
> > the frame and grid() used with the canvas, and other widgets.

You can manage any widget with any geometry manager.  (You can even grid
a button inside of a label, but god knows why you'd want to)

Sometimes you must use "grid" to get proper layout.  For instance, if
you want to create a scrolled item (canvas or text) with horizontal and
vertical scrollbars, this is the only sane way to do it.





More information about the Python-list mailing list