问题
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