I've read those, but I can't quite understand how to get it to work. I've attached a glade XML file and a Python file that I'm using to test the ability to manipulate TreeViews in Python. I'm just trying to get "Column1text" into the first column, and the number 2 into the second column, but it's not working... could anyone help me get this figured out? If you're running it, you'll need python-glade, and both files will need to be in the same directory. On Sun, 2007-11-11 at 19:21 +0100, Gian Mario Tagliaretti wrote:
> 2007/11/11, Caleb Marcus <[EMAIL PROTECTED]>: > > > > I'm pretty new to Python, and days-new to GTK, and the TreeView widget is > > confusing the hell out of me... is there a good guide to using it? > > the pygtk tutorial has got a section dedicated to the treeview widget: > http://www.pygtk.org/pygtk2tutorial/ch-TreeViewWidget.html > > also check the pygtk FAQ: > http://faq.pygtk.org/index.py?req=index > > cheers
test.glade
Description: application/glade
#!/usr/bin/env python
import gtk, gtk.glade, sys
gladexml = gtk.glade.XML('test.glade')
gtklist = gladexml.get_widget('treeview1')
gtklist.append_column(gtk.TreeViewColumn("Column1", gtk.CellRendererText(), text=1))
gtklist.append_column(gtk.TreeViewColumn("Column2", gtk.CellRendererText(), text=2))
gtklistmodel = gtk.ListStore(str, int)
gtklist.set_model(gtklistmodel)
gtklistmodel.append(['Column1text', 2])
gtk.main()
signature.asc
Description: This is a digitally signed message part
_______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
