Ondrej Palkovsky wrote:
>Hi,
>I'm using pixmaps in the first column of GtkCTree widget. I set pixmaps
>using node_set_pixtext method. But if I expand (or collapse) the branch
>with pixmap set, the pixmap of the branch disappears. The only way how
>to restore it is to call node_set_pixtext again. If pixmaps are used in
>another than a first column, there is no problem.
>
>I use: pygtk-0.6.9, gtk 1.2.10 and python2.2
>
>Anybody having similar experience or advice?
>
The "tree" column of a ctree is special. It is not a pixmap column or a
pixtext column, and should not be accessed as one. You can set the
pixmap to display in the tree column in the insert_node() call (one
pixmap to display in the normal state, and another for the expanded
state). If you wish to change the pixmap for the node, you can call
ctree.set_node_info().
The closest FAQ entry about this is:
http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq13.005.htp
(this is mainly about reading info, but should give you the idea).
And yes, the new tree widget is a lot nicer (expect release candidates
for gtk+ 2.0 any day now).
James.
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk