[pygtk] gtk.TreeView
Alessandro Dentella
sandro at e-den.it
Wed Sep 3 20:06:31 WST 2008
> My question is, that is there any easy way, to store the status of the
> current look of the tree (I mean, which branches are expanded, which
> are collapsed), and after the reloading, revert tis state as much as
> possible? The problem is, that the reloaded structure is not exactly
> the same, some leafs or subtrees are missing, or something is
> inserted, but largest part of the tree is the same.
I can understand, you are changing the treeview model, so there is
no way to couple a path/iter to the information if it was expanded or not
(as far as I know).
On the other hand if you have an independent way for defining each line (eg:
the id of th db) you may be able to record the expanded status of each id
*before* changing the model and set it back when setting the new model.
If your model had one field for the primary key of the db you could just use
that to create such a correspondence.
sandro
More information about the pygtk
mailing list