Python/wxPython/wx.CheckBox: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
Documents | '''Documents''' | ||
* [https://docs.wxpython.org/wx.CheckBox.html#wx.CheckBox wxPython] | * [https://docs.wxpython.org/wx.CheckBox.html#wx.CheckBox wxPython] | ||
* [https://wiki.wxwidgets.org/Using_XML_Resources_with_XRC#wxCheckBox XRC] | * [https://wiki.wxwidgets.org/Using_XML_Resources_with_XRC#wxCheckBox XRC] | ||
| Line 5: | Line 5: | ||
= wxPython = | = wxPython = | ||
<source lang="python"> | <source lang="python"> | ||
self.chk1 = wx.CheckBox(self, label='1') | |||
self.chk1.SetValue(True) | |||
self.chk1.Bind(wx.EVT_CHECKBOX, self.OnCheck) | |||
</source> | </source> | ||
= XRC = | = XRC = | ||
<source lang="xml"> | <source lang="xml"> | ||
<object class="wxCheckBox" name="checkbox_id"> | |||
<size>200,50</size> | |||
<label>CheckBoxItem</label> | |||
<checked>1</checked> | |||
</object> | |||
</source> | </source> | ||