in reply to Re: Re: Stretchy grids in Tk
in thread Stretchy grids in Tk

Howdy!

Mastering Perl/Tk, p. 47, says:

If you use -sticky with your widgets and then resize the window, you'll notice that the widgets don't resize as you would expect. This is because resizing of the cells and the widgets in them is taken car of with the gridColumnconfigure and gridRowconfigure methods...

Further reading suggests applying a weight of 1 to each row and column. That will allow each to expand. A row/ column with a weight of 0 takes only as much space as it needs; a weight of 2 would take twice as much space as a weight of 1 (so some can be greedier than others).

yours,
Michael

Replies are listed 'Best First'.
Re(4): Stretchy grids in Tk
by rinceWind (Monsignor) on Sep 15, 2003 at 14:01 UTC
    herveus++

    Nice one! That did the trick. Setting the weight to 1 for every row and column enables the stretchiness I was looking for.

    I will also look at buying this book. This will relieve some of my frustrations in the documentation that comes with Tk.

    --
    I'm Not Just Another Perl Hacker