Hi, Neo
Your code is painting on the client area of the frame, but there are also StaticBitmap’s that repaint their client area, which results in a glitchy look.
This seems to be related to your previous post. I think the easiest way is to set bitmaps on your transparent buttons <wx.lib.platebtn> by just adding,
self.btn.SetBitmap(your_png)
As far as I can think of, two other ways to achieve your goals:
- Draw a bitmap on the base bitmap to make one bitmap image.
Suppose A and B are fore and back bitmap images,
dc = wx.MemoryDC(B)
dc.DrawBitmap(A, x, y, useMask=True)
del dc
self.base = wx.StaticBitmap(self, bitmap=B)
EDIT In this case, you don’t need to handle EVT_PAINT