Currently I am having to do this in my application to create dynamic
treestore; is the a better way to do this?

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   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to