Example #1
0
 def __init__(self, panel, name='teste', func=None, default=False, attr=None, pos=[0,0], size=[10,200], style=0, validator=wx.Validator()):
     controlBase.__init__(self, panel, attr)
     self.name = name
     self.func = func
     self.control = wx.Button(self.panel, -1, name, pos, size, style, validator, name)#, (65, 40), (150, 20), wx.NO_BORDER)
     
     #self.control.SetDefault(default)
     
     self.panel.Bind(wx.EVT_BUTTON, self.callback, self.control)
Example #2
0
    def __init__(self, panel, name="teste", attr=None):
        controlBase.__init__(self, panel, attr)
        self.control = wx.CheckBox(self.panel, -1, attr)  # , (65, 40), (150, 20), wx.NO_BORDER)
        self.control.SetValue(bool(self.getAttr()))

        self.control.Bind(wx.EVT_CHECKBOX, self.callback, self.control)