我需要获取Gtk.TreeView
中的节点位置。我能够获得该行和用户更改的内容,但是我必须强化该列,有什么方法可以实现?Mono在TreeView中获取节点位置
下面的代码:
private void artistNameCell_Edited (object o, Gtk.EditedArgs args)
{
Gtk.TreeIter iter;
musicListStore.GetIter (out iter, new Gtk.TreePath (args.Path));
Song song = (Song) musicListStore.GetValue (iter, 0);
song.Artist = args.NewText;
}
从这儿http://www.mono-project.com/GtkSharp_TreeView_Tutorial,它是可编辑的文本单元部分。在代码中,他们只选择列号0: - /,但我需要用户点击任何列。分别确切的节点位置像node[row,column]
,现在我只有node[iter,0]
。
的可能重复[TreeView中的鼠标指针下如何获得该项目(树节点)?](http://stackoverflow.com/问题/ 9556389 /如何获得项目树节点下的鼠标指针在树视图) – skolima 2012-03-09 21:11:03
不,此行Item item =(Item)store.GetValue(iter ,0);再次提到第一列: - /我试过了 – user1086004 2012-03-09 21:23:33