[Haskell-cafe] Problem resizing widget contained in window
Jeff Heard
jefferson.r.heard at gmail.com
Tue Jul 14 10:46:59 EDT 2009
I created a window, like so:
Gtk.windowSetTitle win name
Gtk.widgetSetName win "Hieroglyph"
Gtk.onDestroy win (exitWith ExitSuccess)
Gtk.windowSetDefaultSize win w h
Gtk.containerResizeChildren win
And an GLDrawingArea like so:
config ← Gtk.glConfigNew [Gtk.GLModeRGBA, Gtk.GLModeMultiSample,
Gtk.GLModeDouble, Gtk.GLModeDepth, Gtk.GLModeAlpha]
area ← Gtk.glDrawingAreaNew config
Gtk.onRealize area ◊ GL.drawBuffer $= GL.BackBuffers
Gtk.onExpose area (λ_ → renderOnExpose bus ≫ return True)
and finally show it like this:
Gtk.containerAdd win area
Gtk.widgetShowAll win
Now, if someone resizes the window, the GLArea does not appear to
resize along with it. Did I screw something up?
-- Jeff
More information about the Haskell-Cafe
mailing list