Python/wxPython/wx.StaticBitmap: Difference between revisions
Jump to navigation
Jump to search
(→Python) |
(→Python) |
||
| Line 5: | Line 5: | ||
im = wx.Image(image_stream) | im = wx.Image(image_stream) | ||
bm = wx.Bitmap(im) | bm = wx.Bitmap(im) | ||
sb = wx.xrc.XRCCTRL(self.frame, 'name_of_wxsb', 'wxStaticBitmap') | |||
sb.SetBitmap(bm) | |||
</source> | </source> | ||
Latest revision as of 09:48, 4 December 2019
XRC Example
Python
im = wx.Image(image_stream)
bm = wx.Bitmap(im)
sb = wx.xrc.XRCCTRL(self.frame, 'name_of_wxsb', 'wxStaticBitmap')
sb.SetBitmap(bm)
XRC
<object name="name_of_wxsb" class="wxStaticBitmap">
<size>200,60</size>
</object>
Programmatically Example
# TODO