Clearing a wx.lib.scrolledpanel.ScrolledPanel

Hi,

I don't kown if this is working on a ScrolledPanel, on a
ScrolledWindow one workes likes this:

From the demo > Core Windows/Controls > ScrolledWindow

    def OnPaint(self, event):
         if BUFFERED:
             # Create a buffered paint DC. It will create the real
             # wx.PaintDC and then blit the bitmap to it when dc is
             # deleted. Since we don't need to draw anything else
             # here that's all there is to it.
             dc = wx.BufferedPaintDC(self, self.buffer, wx.BUFFER_VIRTUAL_AREA)
         else:
             dc = wx.PaintDC(self)
             self.PrepareDC(dc)
             # since we're not buffering in this case, we have to
             # paint the whole window, potentially very time consuming.
             self.DoDrawing(dc)

the key point being self.PrepareDC().

Jean-Michel Fauth, Switzerland

the key point being self.PrepareDC().

Thanks for that, mixed-into some other stuff I did, things are looking
better now. Still get previous images showing through on the edges (near
the scrollbar, but I'll hack on.)

\d