[pygtk] Simple question on forcing a DrawingArea to be redrawn

N. French nbm_clan at yahoo.com
Fri Jan 11 01:59:44 WST 2008


I have a drawing area which I basically ripped from the scribble.py
example.  Basically there's a pixmap, a configure event handler which
draws on the pixmap, and an expose event which uses draw_drawable() to
paint the pixmap onto the drawing area's window.  Works fine.

Now when I click some button I want to redo the whole drawing area
(it's changing the units of a grid that I'm drawing).  Right now
nothing happens unless I then resize the window.  What's the solution? 
I tried a bunch of stuff... send_expose(), other ways of forcing events
(no success), and just calling draw_drawable() again (worked, but I
couldn't figure out the right coordinates from my drawing area so it
drew it in the wrong spot).  I think I'm missing something here... help!


      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping


More information about the pygtk mailing list