[pygtk] gtk.DrawingArea

A.T.Hofkamp a.t.hofkamp at tue.nl
Fri Feb 10 19:00:10 WST 2006


Hello,

Luigi Paioro wrote:
> Now I have another question that I can't solve.
> 
> While I can draw a line on a gtk.gdk.Drawable object, it looks that I 
> cannot delete it. For example I can draw a line using:
> 
> area = gtk.DrawingArea()
> area.window.draw_line(gc, x1, y1, x2, y2)
> 
> but I cannot delete such line... a line isn't identified by an object or 
> an ID and it doesn't exist a proper method to delete it!

 > Is there a trick to solve this trouble?

Mark the area where you have drawn the line as 'dirty', gtk will generate an 
redraw-event to redraw the area, then don't draw the line again.

Albert


More information about the pygtk mailing list