From: Lyle Johnson Date: 2003-01-28T09:39:36+09:00 Subject: Re: [FXRuby] How to force a paint on a canvas. Daniel P. Zepeda wrote: > Try @outputCanvas.update, although you probably want to reorganize your code > and connect it to SEL_MOTION instead of SEL_PAINT. As you are seeing, > SEL_PAINT only gets sent when the window has been obscured and is > uncovered. Look at scribble.rb in the 'examples' directory of the distribution. I agree with everything except the idea about tying this to the SEL_MOTION message. If you did this, the window would no longer get painted in response to normal expose events (i.e. covering the window up, and then uncovering it). Furthermore, all of that repainting in response to *every* mouse motion over the canvas would be extremely inefficient. Leave the handler code alone, and just add calls to FXCanvas#update elsewhere in the program as appropriate, e.g. maybe when the kid adds a new action to the list of commands, or in response to clicking a "Redraw" button or something.