def __init__(self, name, parent, index, label=""): "Class to handle wxCheckBox objects" ManagedBase.__init__(self, name, parent, index) EditStylesMixin.__init__(self) # initialise instance properties self.label = np.TextProperty(label, multiline="grow") # value: Checkbox state (0 = unchecked, 1 = checked, 2 = undetermined) values = [0,1,2] labels = [_('Unchecked'), _('Checked'), _('Undetermined')] self.value = np.IntRadioProperty(0, values, labels, columns=3, default_value=0, name="checked") # rename to value?
def __init__(self, name, parent, id, label, sizer, pos): "Class to handle wxCheckBox objects" ManagedBase.__init__(self, name, 'wxCheckBox', parent, id, sizer, pos) EditStylesMixin.__init__(self) # initialise instance properties self.label = np.TextProperty("", multiline=True, fixed_height=True) # value: Checkbox state (0 = unchecked, 1 = checked, 2 = undetermined) values = [0, 1, 2] labels = [_('Unchecked'), _('Checked'), _('Undetermined')] self.value = np.IntRadioProperty(0, values, labels, columns=3, default_value=0, name="checked") # rename to value? if config.preferences.default_border: self.border.set(config.preferences.default_border_size) self.flag.set(wx.ALL)