Re: [Fxruby-users] ScrollWindow confusion
Status: Inactive
Brought to you by:
lyle
From: Lyle J. <ly...@kn...> - 2004-03-06 14:15:14
|
On Mar 4, 2004, at 11:50 PM, Daniel Sheppard wrote: > I've been playing around with the scrollwindow widget, and it's causing > me much confusion. Whatever I try to put into the scrollwindow seems to > get resized to fit within the scroll window, regardless of what layout > hints I give it. I need to add a note on the FOX Community Wiki about this, since it comes up a lot. The problem is that some kinds of content windows (including the FXCanvas) don't correctly report their default size to the scroll window and as a result it doesn't "know" how big they really are. A workaround for this with the FXCanvas is to simply place the canvas inside some other container (like an FXHorizontalFrame), and make that container the child of the scroll window, e.g. scroll = FXScrollWindow.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y) canvasFrame = FXHorizontalFrame.new(scroll, LAYOUT_FILL_X|LAYOUT_FILL_Y) canvas = FXCanvas.new(canvasFrame, nil, 0, LAYOUT_EXPLICIT, 0, 0, 600, 600) I think this change will get you the desired effect. Hope this helps, Lyle |