[wxPython-users] Setting a transparent region on a bitmap [sorted]

David Poundall david.poundall at treatmentservices.co.uk
Wed Jan 2 15:46:30 PST 2008



>            self.bind(wx.EVT_PAINT), self.OnPaint)
> ...
>          def OnPaint(self, event):
>              dc = wx.PaintDC(self)
>              dc.DrawBitmap(self.bmp, x, y, True)
> 
> 
> Does that get you closer?


Yes it does - thank you Chris.  When I was cribbing Andrea's code I missed
the paint section.  In the end what worked was....

    def OnPaint(self, event):                
        dc = wx.PaintDC(self)
        dc.DrawBitmap(self.bmp, 0, 0, True)
        wx.SafeYield()        
        event.Skip()

That's a relief I thought I was going mad.  The learning curve on wx.Python
is all but doing my head in.  


- David

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.17.13/1206 - Release Date: 01/01/2008
12:09
 




More information about the wxpython-users mailing list