Trigger pygtk drawingarea redraw

C

ch424

Hi,

Does anybody know the fastest way to trigger a DrawingArea redaw in
pygtk? At the moment, I'm using a bit of a hack:

def redraw(self):
self.area.hide()
self.area.show()

Is there a better way to trigger a redraw? This causes flickering when
the window gets bigger than 400x400 pixels, which is a nuisance...
there must be a better way of clearing the area and letting it redraw
itself?


Many thanks for any help,

Alex
 
J

Jeremy Moles

Call the gtk.Widget method queue_draw(); if you derive from DrawingArea
then simply:

self.queue_draw()

Of if the DrawingArea is some kind of "has-a" member:

self.DrawableThing.queue_draw()
 
C

ch424

Ahh.. fantastic! Flickers be gone! Yaarrrg!

It was "self.area.queue_draw()" in case anyone wants to know. :)

Thanks so much!

Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top