Hi. I am trying to use bufferedDc and all the rest just according to the ‘radargraph’ example in “wxPython in Action” source. (Maybe my problem sounds familiar because I wrote about it some months ago)
I think I have done everything well, but when the program starts, it doesnt seem to do the ‘initbuffer’ thing. It just paint what I want if I click on a button
Please, take I look at the code attached and see if you could help me
Hi. I am trying to use bufferedDc and all the rest just according to the ‘radargraph’ example in “wxPython in Action” source. (Maybe my problem sounds familiar because I wrote about it some months ago)
I think I have done everything well, but when the program starts, it doesnt seem to do the ‘initbuffer’ thing. It just paint what I want if I click on a button
Please, take I look at the code attached and see if you could help me
Hi. I am trying to use bufferedDc and all the rest just according to the 'radargraph' example in "wxPython in Action" source. (Maybe my problem sounds familiar because I wrote about it some months ago)
I think I have done everything well, but when the program starts, it doesnt seem to do the 'initbuffer' thing. It just paint what I want if I click on a button
Please, take I look at the code attached and see if you could help me
You are binding the EVT_PAINT handler to the frame, but everywhere else you are drawing on the panel. If you change it to process the panel's paint event then it will do what you expect.
self.panel.Bind(wx.EVT_PAINT,self.OnPaint)
def OnPaint(self,event):
dc = wx.BufferedPaintDC(self.panel, self.buffer)
event.Skip()
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!