GtkTreeView. How to display dynamically growing tree model correctly?



Hello All,

I've faced some problems with using GtkTreeView and will appreciate any
promt.

One of the features of my application is to display some tree-like data
structure, that grows dynamically. Mean, there is separate thread updating
the tree model. The minor point is that GtkTreeView paths became incorrect,
when tree model is changed, that leads to strange behaviour from user point
of view.

For example, if there is tree consiting of 3 root nodes "apple", "table" and
"train", each with 5 childrens and user is unfolded the second one
("table"). If at the same time tree model will be updated in the way of
adding the new root node (the "plane") before the second one (the "table"),
than this new node became a second root node and will be displayed as
unfolded. Instead, from user point of view, the right behaviour is when new
nodes will be displayed as folded and currently unfolded nodes will stay
unfolded.

How is it possible to achieve such behaviour?

Thanks,
- Alex.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]