# Bryan Schumaker (2 / 12 / 2011) import gtk attrs = ("id", "track", "title", "lenstr", "artist", "album", "year") columns = ["Id", "#", "Title", "Length", "Artist", "Album", "Year"] col_width = [ 2, 20, 300, 60, 125, 125, 50] cell = gtk.CellRendererText() cell.set_fixed_height_from_font(1) class Column(gtk.TreeViewColumn): def __init__(self, index, label): gtk.TreeViewColumn.__init__(self, label, cell) self.add_attribute(cell, 'text', index) self.set_resizable(True) self.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) self.set_min_width(2) self.set_max_width(700) self.set_fixed_width(col_width[index])