def __init__(self, parent, art_id=None, art_size=DEF_SIZE, text='', tooltip='', padding=0, decoration_padding=6, flat=True, native=True, fontbold=False, fontsize=0, textplace=RIGHT, onclick=None, repeat=False): self.flat = flat self.decoration_padding = decoration_padding GenericGWidget.__init__(self, parent, tooltip, onclick, repeat) if native: rndr = renderer.NativeButtonRenderer else: rndr = renderer.ButtonRenderer self.renderer = rndr(self, art_id, art_size, text, padding, fontbold, fontsize, textplace)
def __init__(self, parent, value=False, art_id=None, art_size=DEF_SIZE, text='', tooltip='', padding=0, decoration_padding=6, flat=True, native=not const.is_mac(), fontbold=False, fontsize=0, textplace=RIGHT, onchange=None): self.flat = flat self.decoration_padding = decoration_padding self.value = value self.onchange = onchange GenericGWidget.__init__(self, parent, tooltip) if native: rndr = renderer.NativeButtonRenderer else: rndr = renderer.ButtonRenderer self.renderer = rndr(self, art_id, art_size, text, padding, fontbold, fontsize, textplace)
def __init__(self, parent, art_id=None, art_size=DEF_SIZE, text='', tooltip='', padding=0, fontbold=False, fontsize=0, textplace=RIGHT, onclick=None, onrightclick=None, repeat=False): self.flat = True GenericGWidget.__init__(self, parent, tooltip, onclick, repeat) self.renderer = renderer.LabelRenderer(self, art_id, art_size, text, padding, fontbold, fontsize, textplace) if onrightclick: self.rightclick_cmd = onrightclick self.Bind(wx.EVT_RIGHT_UP, self._on_rightclick, self)