Re: [Fxruby-users] Attaching a Canvas to a ScrollArea
Status: Inactive
Brought to you by:
lyle
From: Lyle J. <ly...@kn...> - 2004-05-11 00:36:34
|
On May 5, 2004, at 11:22 AM, Claus Spitzer wrote: > However, I want to put the canvas in a FXScrollArea because eventually > it will be larger than the screen... and that's what I'm having > trouble with. Please see the question "Why Can't I Place a Fixed-Size FXCanvas inside an FXScrollwindow?" near the bottom of this page: http://www.fox-toolkit.net/cgi-bin/wiki.pl?FAQ For your example program, I replaced these lines: @scroller = FXScrollArea.new(...) @canvas = FXCanvas.new( @scroller, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y ) with these: @scroller = FXScrollWindow.new( self, LAYOUT_FILL_X|LAYOUT_FILL_Y ) canvasFrame = FXVerticalFrame.new( @scroller, LAYOUT_FILL_X|LAYOUT_FILL_Y ) @canvas = FXCanvas.new( canvasFrame, nil, 0, LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT, 0, 0, 600, 400 ) and I get what looks reasonable. It draws a pretty picture, anyways ;) Hope this helps, Lyle |