def __init__(self, parent, text, on_click=None, should_be_active=None, align='right'): self._on_click = Delegate() if on_click: self._on_click += on_click ClearLink.__init__(self, parent, -1, text, on_click, style=wx.NO_BORDER | getattr(wx, 'HL_ALIGN_%s' % align.upper())) linkfont = skin.get('filetransfers.fonts.link', default_font) self.SetFont(linkfont) self._is_active = Delegate(collect_values=True) if should_be_active: self._is_active += should_be_active
def __init__(self, parent, text, on_click=None, should_be_active=None, align='right'): self._on_click = Delegate() if on_click: self._on_click += on_click ClearLink.__init__(self, parent, -1, text, on_click, style = wx.NO_BORDER | getattr(wx, 'HL_ALIGN_%s' % align.upper())) linkfont = skin.get('filetransfers.fonts.link', default_font) self.SetFont(linkfont) self._is_active = Delegate(collect_values=True) if should_be_active: self._is_active += should_be_active