Re: Pack , bind, & scrollbar help
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: Pack , bind, & scrollbar help

From: Bryan Oakley <oakley@bardo.clearlight.com>
Date: Mon Feb 27 2006 - 16:22:53 CET

Ray wrote:
> Most of my Tk experience has been taking code from the widget examples
> and modifying it. I thought that you used packOR grid - but not both.

You shouldn't ever use them together in the same parent but you can mix
and match them with different parents.

That is, you should NOT do this:

     pack .foo.bar1 ...
     grid .foo.bar2 ...

But it's perfectly fine to do this:

     pack .foo.baz ...
     grid .bar.baz ...

In the first case both widgets are being added to ".foo" so you
shouldn't use two different geometry managers in .foo

In the second case, one widget is going to ".foo" and one to ".bar" so
it's fine to use both grid and pack.

>
> If I read correctly what you wrote, I can use pack to position the
> frames and then grid to position widgets in the frame. Is that a
> correct interpretation?

Yes
Received on Sun Apr 30 02:16:56 2006