[wxPython-users] transparent background for a panel widget

Christopher Barker Chris.Barker at noaa.gov
Thu Jul 19 23:43:13 PDT 2007


This is going to be tricky.

One thing to keep in mind is that DCs don't really support transparency, 
so when you do:

DC.SetBrush(wx.TRANSPARENT_BRUSH)

then draw, you're not drawing transparent pixels -- you're drawing 
nothing, so whatever was there before the drawing call is still there -- 
and it's probably not transparent -- it's black, or whatever junk is 
left in memory.

I wish I could tell you how to do what you want....

Have you tried just plain:

def OnPaint(self, evt):
     dc.wx.PaintDC(self)
     evt.Skip()


-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

NOAA/OR&R/HAZMAT         (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception




More information about the wxpython-users mailing list