From: "Paul E.C. Melis" Date: 2002-08-01T03:39:39+09:00 Subject: Re: FXRuby: how do you capture a canvas resize? "Lyle Johnson" wrote in message news:3D481D18.1020402@users.sourceforge.net... > Paul E.C. Melis wrote: > > 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, Almost perfect, except that after starting up (before doing any resizing myself) the size reported is 1x1 pixel. Any way to get the initial size? Paul