def __init__(self, *args, **kwargs): """Sidebar ListBox Args: stack (Gtk.Stack): entities stack; entity_label (Gtk.Label): title of the visible entity; description_label (Gtk.Label): description of the visible entity; autoselect (bool): whether to select the first element by default. """ ListBox.__init__(self, *args, **kwargs) self.set_header_func(self.update_header)
def __init__(self, autoselect=False, *args, **kwargs): """Sidebar ListBox Args: entity_label (Gtk.Label): title of the visible entity; description_label (Gtk.Label): description of the visible entity; autoselect (bool): whether to select the first element by default. """ ListBox.__init__(self, *args, **kwargs) # Set some inputs as attributes self.autoselect = autoselect # Set "last" selected entities attribute self.last = [] # Set separator as row header self.set_header_func(self.update_header) self.connect("row-selected", self.sidebar_row_selected_cb)
def __init__(self, *args, frame=True, **kwargs): ListBox.__init__(self, *args, **kwargs) self.set_header_func(self.update_header) if not frame: self.set_shadow_type(0) #None