From: Lyle Johnson Date: 2002-08-01T02:19:25+09:00 Subject: Re: FXRuby: how do you capture a canvas resize? Paul E.C. Melis wrote: > I'm building a small drawing application by hacking the Scribble example > included in FXRuby. But I can't seem to figure out how you can respond to > resize events. Basically, whenever the window is resized (and therefore the > drawing canvas on it) I want to know about it, so I can store the canvas's > new size in pixels. You want to catch the SEL_CONFIGURE message: @canvas.connect(SEL_CONFIGURE) do |sender, sel, evt| puts "New canvas size: #{sender.width} x #{sender.height} pixels" end Hope this helps, Lyle