当我创建一个wx.Staticbitmap并放入其中的位图时,它似乎显示RBG = 240,240,240透明(应该是浅灰色)的颜色。 要解决这个问题,我将wx.Staticbitmap的背景颜色也设置为240,240,240。wxPython wx.StaticBitmap颜色240,240,240
代码如下所示:
self.image_container = wx.StaticBitmap(parent, id=-1, size=(self.x, self.y), pos=(0,0))
self.image_container.SetBackgroundColour(wx.Colour(240, 240, 240))
self.image_container.SetBitmap(bmp)
self.image_container.Update()
self.image_container.Refresh()
位图具有24位的深度。我可以得到wx.StaticBitmap错误的样式,但我无法弄清楚。它似乎是一个错误。
Python版本是:2.7.13
蜡质的版本是:wxPython的==在Windows 10