[fxruby-users] elementary problem with LAYOUT_FILL

William B. Parsons wbparsons at cshore.com
Mon Aug 31 19:55:29 EDT 2009


On Mon, 31 Aug 2009 17:06:48 -0500
Lyle Johnson <lyle at lylejohnson.name> wrote:

> On Sat, Aug 29, 2009 at 4:18 PM, William B. Parsons<wbparsons at cshore.com> wrote:
> 
> > I'm sure this must be simple but I can't seem to figure out how to fill the
> > main window with widgets.  The following bare-bones test app illustrates my
> > problem:
> > ----------------------
> > #!/usr/bin/env ruby
> > require 'fox16'
> > include Fox
> >
> > class TopLevelWindow < FXMainWindow
> >   def initialize(app)
> >      super(app, 'Test Application', :width => 200, :height => 300)
> >      FXPacker.new(self, FRAME_SUNKEN, :opts => LAYOUT_FILL)
> >   end
> >   def create
> >      super
> >      show(PLACEMENT_SCREEN)
> >   end
> > end
> >
> > FXApp.new do |app|
> >   TopLevelWindow.new(app)
> >   app.create
> >   app.run
> > end
> > ----------------------
> > Why doesn't the FXPacker fill the top-level window?
> 
> For some reason you've split out the construction options over two
> separate arguments. Trying changing this line:
> 
>     FXPacker.new(self, FRAME_SUNKEN, :opts => LAYOUT_FILL)
> 
> to this:
> 
>     FXPacker.new(self, :opts => FRAME_SUNKEN | LAYOUT_FILL)

Thanks! - that seems to have been the problem with my test app.
(I'm still having issues with getting an FXTable to fill its alotted 
space, but I'll poke around with the options a bit more before
bothering the list.)

-- 
Will


More information about the fxruby-users mailing list