Give wx.StaticBitmap a transparent background? wxpython

感情迁移 提交于 2019-12-24 06:44:07

问题


I have an image that has a white background, how can I make this background invisible? Its in a wx.StaticBitmap

wx.StaticBitmap(self, bitmap=wx.Bitmap('images/myimage.png'),pos=(0,0))

回答1:


By invisible, I assume you mean transparent so that whatever is behind the image shines through.

This is not a function of widgets, but whatever you use to edit your image. You don't say!

I use microsoft visual studio. Here's a screenshot. Notice how the background, shown in a sort of blue-green in the editor - this will show up as transparent, which you can see happening in the column showing the fianl appearances.



来源:https://stackoverflow.com/questions/9684388/give-wx-staticbitmap-a-transparent-background-wxpython

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!