On Thu, Jan 02, 2003 at 12:15:18PM -0200, Johan Dahlin wrote: > tor 2003-01-02 klockan 11.51 skrev Christian Reis: > > On Wed, Jan 01, 2003 at 09:27:25PM +0100, Ola wrote: > > > I have a GtkCTree with two columns. if I try to access the text in > > > column 0 I get an exception, if I try to access column 1 it works. Why? > > > (or is there another, better whay to iterate through the data in the > > > tree?) > > > > Well, the CTree is a pretty wierd widget. I have the same trouble as you > > using get_text(), but I suspect it is because column 0 is the tree > > column. Have you tried using node_get_text(node, column) instead? It > > should work. Of course, you need to get a reference to the node - it's > > returned by insert_node() IIRC, but you can also use node_nth(row). > > It's not only weird is very crappy, old and even deprecated in Pygtk > 2.0.
But if you are using Gtk 1.2, it is actually quite usable, as all the existing applications can prove. Oh, its API is not the loveliest, but that could be say for more than just CTree <wink>. > Gtk 2.x provides a new much more flexible widget called GtkTreeView > which together with GtkTreeStore replaces CTree. > If you want a modern, convenient and capable of very advanced uses. Yes, that's true; however, that's not what he asked, and TreeView has its fair share of bugs. CTree, for all its shortcomings, has been in use and tested over 10 iterations of Gtk+-1.2, and it's limitations are well-known and documented. Take care, -- Christian Reis, Senior Engineer, Async Open Source, Brazil. http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
