http://www.perlmonks.org?node_id=291545


in reply to Stretchy grids in Tk

I don't have Tk on this machine to test this with, but you may want to try creating your widgets with -expand => 1 to expand the allocation rectangle to fill all the unfilled space, and -fill => 'both' to make the widget take up the full space of the allocation rectangle.

Let me know if there's any problems with this as I'll have my normal Tk-equipped machine again soon so could Play.

Replies are listed 'Best First'.
Re: Stretchy grids in Tk
by Abigail-II (Bishop) on Sep 15, 2003 at 13:02 UTC
    I don't have Tk on this machine to test this with, but you may want to try creating your widgets with -expand => 1 to expand the allocation rectangle to fill all the unfilled space, and -fill => 'both' to make the widget take up the full space of the allocation rectangle.

    That's only for the pack manager, not for the grid manager. For the latter, you need to use the -sticky option, and set it to the value nesw.

    Abigail