Python/wxPython/wx.StaticBitmap: Difference between revisions

From Fundamental Ramen
Jump to navigation Jump to search
Line 13: Line 13:
= XRC =
= XRC =
<source lang="xml">
<source lang="xml">
<object class="wxCheckBox" name="checkbox_id">
<object name="name_of_wxsb" class="wxStaticBitmap">
   <size>200,50</size>
   <size>200,60</size>
  <label>CheckBoxItem</label>
  <checked>1</checked>
</object>
</object>
</source>
</source>

Revision as of 09:38, 4 December 2019

Documents

wxPython

im = wx.Image(image_stream)
bm = wx.Bitmap(im)
sb = wx.xrc.XRCCTRL(self.frame, 'name_in_xrc', 'wxStaticBitmap')
sb.SetBitmap(bm)

XRC

<object name="name_of_wxsb" class="wxStaticBitmap">
  <size>200,60</size>
</object>