[wxpython-users] A newbie question about wx.PaintEvent
Robin Dunn
robin at alldunn.com
Sat May 10 16:04:09 PDT 2008
gaobing wrote:
> The printed result is incrementd from 1 to larger numbers continuously, why?
>
> But if I palce "dc=wx.PaintDC(self.panel)" into the "OnPaint" method,
> the result is what I expected, why?
This is a Microsoft "feature". If the update region of the window was
not changed upon return from sending the WM_PAINT message then it will
assume that you are not finished yet and will send it again immediately.
Creating the wx.PaintDC, even if you don't use it, does what is needed
to let Windows know that the event has been fully handled.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list