/ Published in: Python
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
treeview = self.tree.get_widget("myTreeView") liststore = gtk.ListStore(str) # create a list store with just one column (which holds a string) treeview.set_model(liststore) tc = gtk.TreeViewColumn("TheTitle") treeview.append_column(tc) cr = gtk.CellRendererText() tc.pack_start(cr, True) tc.add_attribute(cr, "text", 0)