I'm using TreeView with ListStore. my code goes like this:
class a:
def __init__(self):
.
.
types = int, str, str, int
myTree, myStore = b.create_treeview(types)
.
.
class b:
def create_treeview(types):
#create gtk tree view object
#return treeview and store (for the columns)
store = gtk.ListStore(types[0], types[1], types[2], types[3])
treeView = gtk.TreeView(store)
treeView.set_rules_hint(True)
return treeView, store
As you can see, class b doing some code work for class b. The variable types helping me send all types to the store. The problem is the way I'm using it at class b. Is there any why to make it more generic for re-use?
Thanks