[fxruby-users] Why does FXScrollArea not scroll?

Martin aus Chemnitz MartinAusChemnitz at gmx.net
Wed Dec 15 12:15:55 EST 2004


Hi!

I am new to Ruby and Fox and at the moment am stuck at a problem where I 
cannot find an answer (I tried the examples and surfed the net for ages).

I created an (almost) minimal example. Can anyone tell my, why the
following FXScrollArea does not scroll? Thanks a lot!

Martin



require 'fox'
include Fox

class MyWindow < FXMainWindow
   def initialize(app)
     super(app, "ScrollTest", nil, nil, DECOR_ALL, 0, 0, 400, 300)

     @scrollarea = FXScrollArea.new(self,
       SCROLLERS_NORMAL|LAYOUT_FILL_X|LAYOUT_FILL_Y)
     FXButton.new(@scrollarea, "text", nil, nil, 0,
       LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT, 10, 10, 600, 600)

     puts @scrollarea.contentHeight
   end
   def create
     super
     show(PLACEMENT_SCREEN)
   end
end
  if __FILE__ == $0
   $application = FXApp.new("ScrollTest", "ScrollTest")
   MyWindow.new($application)
   $application.create
   $application.run
end



More information about the fxruby-users mailing list