It is possible to add dynamically images to wx.StaticBitmap?
Now I can only add one image and only change existing image.
I want to display next image after new line or something else.
My actual code:
self.images = wx.StaticBitmap(self, id=-1, pos=wx.DefaultPosition,
size=(-1,100),
style= wx.SUNKEN_BORDER)
data = open(imagename,"rb").read()
stream = cStringIO.StringIO(data)
image = wx.ImageFromStream(stream)
image.Rescale(77,57)
bmp = wx.BitmapFromImag开发者_运维问答e( image)
self.images.SetBitmap(bmp)
I don't see how you could possibly include more than one image in a wx.StaticBitmap
.
However, you could:
- dynamically create the image that you are going to display in the
StaticBitmap
, using PIL or something to "concatenate" the images - just display multiple
wx.StaticBitmap
s in awx.Sizer
of some kind
精彩评论