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

Joachim Breitner mail at joachim-breitner.de
Sun Jan 13 04:04:33 WST 2008


Hi,

Am Donnerstag, den 10.01.2008, 08:59 -0800 schrieb N. French:
> 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!

I always use .queue_draw(), works fine here.

Greetings,
Joachim
-- 
Joachim "nomeata" Breitner
  mail: mail at joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C
  JID: nomeata at joachim-breitner.de | http://www.joachim-breitner.de/
  Debian Developer: nomeata at debian.org
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : nicht verfügbar
Dateityp    : application/pgp-signature
Dateigröße  : 189 bytes
Beschreibung: Dies ist ein digital signierter Nachrichtenteil
URL         : http://www.daa.com.au/pipermail/pygtk/attachments/20080112/ca32001f/attachment.pgp


More information about the pygtk mailing list