[Gtk-sharp-list] How can I make make NodeView/TreeView reflect
data changes?
Finn Gruwier Larsen
finn at gruwier.dk
Thu Mar 23 11:09:25 EST 2006
Yo'av Moshe wrote:
> It would be nice if you could share your solution.
Of course. I just thought that I was the only newbie on this list, and I
wouldn't bother people with solutions on "trivial" problems :-)
Let me just repeat my question: "I have a NodeView connected to a
NodeStore. When data in the NodeStore is changed, how can I make the
NodeView reflect it?"
And here's my solution: Actually the NodeView *does* reflect changes in
the NodeStore automagically. But my mistake was in the way i "changed"
the data. I did this by deleting the NodeStore completely and
instantiating a new NodeStore with the same name. And that didn't work.
So what I do now instead is removing all data from the NodeStore with
NodeStore.Clear(), and then I add the new data with
NodeStore.AddNode(x), where x is a subclass of Gtk.TreeNode.
You'r welcome to ask for more details.
Best regards,
Finn G. Larsen
More information about the Gtk-sharp-list
mailing list