http://qs321.pair.com?node_id=403386


in reply to Re^2: Tk scrollbar
in thread Tk scrollbar

To get your widgets to stretch using the grid manager, you need to specify the -sticky attribute. Basically for a given widget, you tell grid which sides (n,s,e,w) should "stick", and it makes sure those sides of the widget always touch the appropriate border of the widget's grid cell. In this case, you want the scrollbar to extend all the way from the top of the cell to the bottom, so you want the top (n) and bottom (s) of the widget to stick:

$f->Listbox()->grid($f->Scrollbar(), -sticky => 'ns');

Replies are listed 'Best First'.
Re^4: Tk scrollbar
by Perluser (Novice) on Oct 28, 2004 at 16:38 UTC
    Yes, that's what I wanted. Thanks to everyone.