[fxruby-users] elementary problem with LAYOUT_FILL
Lyle Johnson
lyle at lylejohnson.name
Mon Aug 31 18:06:48 EDT 2009
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)
Hope this helps,
Lyle
More information about the fxruby-users
mailing list