[fxruby-users] Forcing a re-paint

Lyle Johnson lyle at lylejohnson.name
Wed Oct 29 16:05:52 EDT 2008

On Oct 29, 2008, at 1:40 PM, David Toll wrote:

> I have an FXText window which I would like to force to be repainted  
> immediately, not wait for the lazy re-paint.
> I have a call to repaint() for the FXText window and for the FXApp.
> The documentation for FXApp.repaint says "Paint all windows marked  
> for repainting.  On return all the applications windows have been  
> painted".  I take that to mean (or hope that it means) that this a  
> synchronous call, and your program should wait for the repaint to  
> complete.  However that clearly is not the case - the window gets  
> repainted some considerable time later.

This question is addressed in the FAQ:


I think you should be able to call update() on the FXText window (to  
mark it as dirty and in need of a repaint), followed by a call to  
FXApp#flush to immediately flush all drawing commands to the display.

> There is no documentation of a repaint method for FXText, nor for  
> its parent FXScrollArea.  FXScrollArea's parent is Object, so I am  
> not at all sure from which class FXText gets a repaint method.

Actually, FXScrollArea's base class is FXComposite, not FXObject:


Hope this helps,


"FXRuby: Create Lean and Mean GUIs with Ruby"
Now available from the Pragmatic Bookshelf!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20081029/95ad6c62/attachment-0001.html>

More information about the fxruby-users mailing list