Hi, 

From: mhm26 / drexel.edu (matt)
Subject: [Ruby/TK] Widget Internal Layout
Date: Mon, 17 May 2004 22:38:52 +0900
Message-ID: <13383d7a.0405170535.3faea337 / posting.google.com>
> My question is why doesn't the listbox in the TkScrollingListbox
> expand and fill the frame when the frame gets more space -- I made it
> sticky(news)... do I have a misunderstanding of the grid layout
> manager?  Is the world completely topsy turvy?  Please help!  Thanks
> :-)

You'll forget to configure 'weight' option for 'grid' geometry manager. 
Please see the example 'ext/tk/sample/tktextframe.rb'. 
-----------------------------------------------------------------
>     @list.yscrollbar(@y)
>     @list.xscrollbar(@x)

      TkGrid.rowconfigure(@frame, 1, 'weight'=>1, 'minsize'=>0)
      TkGrid.columnconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0)

>     @list.grid('row'=>1, 'column'=>0, 'sticky'=>'nsew')
-----------------------------------------------------------------

And I think you should set 'expand' option for packing the entry 
widget to false. 
-----------------------------------------------------------------
> list.instance_eval { @frame.configure('background'=>'blue') }
> root.configure('background'=>'yellow')
> 
> text.pack('side'=>'top', 'fill'=>'x',    'expand'=>true)
                                                     ^^^^
                                                     false
> list.pack('side'=>'top', 'fill'=>'both', 'expand'=>true)
> 
> Tk.mainloop
-----------------------------------------------------------------
-- 
                                  Hidetoshi NAGAI (nagai / ai.kyutech.ac.jp)