On Sat, 2010-11-27 at 20:40 -0600, alex goretoy wrote: > Currently I am having to do this in my application to create dynamic > treestore; is the a better way to do this?
You could do treestore = gtk.TreeStore(object) where obj contains the list of strings. However you would then have to write your own display functions [1] for the (presumed) treeview columns. John [1] see gtk.TreeViewColumn.set_cell_data_func > > > def get_treestore(n): > if n == 0: > treestore = gtk.TreeStore(str); > elif n == 1: > treestore = gtk.TreeStore(str); > elif n == 2: > treestore = gtk.TreeStore(str, str); > elif n == 3: > treestore = gtk.TreeStore(str, str, str); > elif n == 4: > treestore = gtk.TreeStore(str, str, str, str); > else: > treestore = gtk.TreeStore(str); > > > return treestore > > > > > Thank you in advance, > -Alex Goretoy > > _______________________________________________ > pygtk mailing list pygtk@daa.com.au > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://faq.pygtk.org/ _______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/