开发者

Remove rows from a Gtk.Treeview with Mono

I have a treeview control( multiple selection supported) with a liststore attached. I need to remove some of the rows at some point. I can do that be clearing the liststore( ListStore.Clear()) and then repopulating it with items but when I se开发者_如何学编程t the liststore as model of the treeview I get a crash. Anybody has a better solution for removing rows/items from a treeview ?


It shouldn't crash. Are you clearing and populating it from the GUI thread, or some worker thread? GTK+ isn't thread-safe, so if you're using threads make sure you use Gtk.Application.Invoke or similar.

Note that there's also

Gtk.ListStore.Remove (ref TreeIter iter)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜