AW: [Fxruby-users] scrollwin confusion
Status: Inactive
Brought to you by:
lyle
From: Recheis M. <Mei...@av...> - 2003-09-18 19:00:26
|
Lyle Johnson [mailto:jl...@cf...] wrote: >Recheis Meinrad wrote: > >| what i want is simply a glcanvas that has a fixed size. when bigger >than the holding window then i want scrollbars to appear. [...] > >This always confuses me too; this time I'm going to write it down >somewhere so I don't have to dig through the FOX source code the next >time it comes up ;) > >You want to use FXScrollWindow, but there is a trick for some kinds of >content widgets (including FXGLCanvas). You need to put a "dummy" >container frame of some kind as the child of the FXScrollWindow: > >~ scrollWindow =3D FXScrollWindow.new(...) >~ canvasFrame =3D FXPacker.new(scrollWindow, >~ LAYOUT_FILL_X|LAYOUT_FILL_Y) > >and then put the fixed-size FXGLCanvas inside the frame: > >~ glCanvas =3D FXGLCanvas.new(canvasFrame, glVisual, nil, 0, >~ LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT) >~ glCanvas.width =3D 1024 # or whatever... >~ glCanvas.height =3D 1024 > >Hope this helps, > >Lyle first thanks for the reply using your code the canvas doesn't show up. it starts with = width=3D=3Dheigth=3D=3D1.=20 but it will show up when setting LAOUT_FILL_X/Y. you got to connect a sel_map with the glcanvas to set LAYOUT_FIX_X/Y = later. but unfortunately this doesn't solve my problem.=20 the scrollwin still doesn't scroll the much larger dummy containing a = glcanvas. maybe i write a *little* demonstration script next week to show the = problem. have a nice weekend, - Henon |