Transparent bitmap(image) in windows!

SMALLp pofuk at mzm.hr
Sat Apr 5 17:11:07 EDT 2008


this is code that adds image:

<CODE>
kartaGif = wx.Image("slike/karta.gif", wx.BITMAP_TYPE_GIF)
		kartaGif.Rescale(self.sizeX, self.sizeY)
		kartaGif = wx.BitmapFromImage(kartaGif)
		mask = wx.Mask(kartaGif, wx.WHITE)
		kartaGif.SetMask(mask)
		self.karta = wx.StaticBitmap(self.mPanel, -1, kartaGif, (10, 10), 
(kartaGif.GetWidth(), kartaGif.GetHeight()))	
		self.karta.Bind(wx.EVT_LEFT_DOWN, self.getPos)	
</CODE>


SMALLp wrote:
> Hello everyone!
> 
> First I want to apologize for asking question about wxPython on this group.
> 
> I'm doing project that uses wx.ScrolledPanel few wx.Bitmap on it. It all 
> looks wonderful on Ubuntu and very very bad on windows because images 
> aren't transparent. As a found out it is problem that windows drowns 
> each image in separate window (or something like that)
> 
> I'm looking for best and easiest solution for this problem. I found 
> something to bind PAINT event to empty function but it doesn't work 
> because of scrolled panel.
> 
> Please help!
> 
> Thanks!



More information about the Python-list mailing list