def __init__(self, text='Label', on_click=None): ''' Creates button. ''' Label.__init__(self, text) self._focusable = True self._activable = True self._on_click = on_click self.style = theme.Button
def __init__(self, text, link, enable_gaussian=True, text_color=ui_theme.get_color("link_text")): '''Init link button.''' Label.__init__(self, text, text_color, enable_gaussian=enable_gaussian, text_size=9, gaussian_radious=1, border_radious=0) self.connect("button-press-event", lambda w, e: run_command("xdg-open %s" % link)) set_clickable_cursor(self)
def __init__(self, text='Label', action=None): ''' :Parameters: `text` : str Text to be displayed within button `action` : function(button) Action to be executed when button is toggled ''' Label.__init__(self, text) self._focusable = True self._activable = True self._action = action self.style = theme.Button
def __init__(self, cl, pts, prob): self.pts = pts tl = np.amin(pts, 1) br = np.amax(pts, 1) Label.__init__(self, cl, tl, br, prob)
def __init__(self, top, left, width, height, backgroundColor, text): Label.__init__(self, top, left, width, height, backgroundColor, text)
def __init__(self, stringFormat, latexFormat=None): ''' Create a Variable. If latexFormat is not supplied, the stringFormat is used for both. ''' Label.__init__(self, stringFormat, latexFormat, 'Variable')