ml wrote:
>On Thu, Jun 20, 2002 at 02:53:24PM +1200, Rob Brown-Bayliss wrote:
>
>
>>Did you have any luck finding the following?
>>
>>
>
>Not yet. Again, if there is any good example for using the
>GTK+ 2.0.5 tree together with PyGTK 1.99.10, glade 1.1.0 and
>libglade 2.0.0, please come up and let's put this info into
>the FAQ!
>
>Many thanks in advance!
>
>
At the moment, Libglade will only be able to place the GtkTreeView
widgets. You will need to connect a model to the view, and set up the
columns manually (I am looking at getting libglade to handle things like
canvas widgets, tree view columns, etc to work in 2.2, but haven't
implemented any of that yet). You can get a reference to the tree view
from the GladeXML object just as you would with any other widget.
(xml.get_widget('widget_name')).
For an example of filling a GtkTreeStore object (a class that implements
the GtkTreeModel interface) with some data, see
pygtk/examples/pygtk-demo/pygtk-demo.py. To set the model for a tree
view, use the set_model() method. In pygtk-demo.py, there is also an
example of setting up columns.
I think I posted an overview of how the tree model and tree view relate
in another post to this list a few months ago. You can probably find it
in the archives.
James.
--
Email: [EMAIL PROTECTED] | Linux.conf.au 2003 Call for Papers out
WWW: http://www.daa.com.au/~james/ | http://conf.linux.org.au/cfp.html
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/