【发布时间】:2012-11-19 15:54:45
【问题描述】:
我想要一个Gtk.TreeView,它的第一列是一个组合框,我可以在其中选择我想要第一列的值。下面是我的代码。
Gtk.TreeViewColumn compteColumn = new TreeViewColumn();
Gtk.CellRendererCombo compteCellCombo = new CellRendererCombo();
compteColumn.PackStart(compteCellCombo, true);
compteColumn.AddAttribute(compteCellCombo, "text", 0);
compteColumn.Title = "Compte Name";
compteCellCombo.Editable = true;
我尝试在互联网上搜索Gtk.CellRendererCombo 属性,但没有发现任何有价值的东西,我尝试了其中的几个:
- 文字
- 文本列
- 型号
- 可编辑
但似乎没有任何效果,至于“文本”属性它会生成这种消息:
(eAppGtk:2528): Gtk-WARNING **: gtkliststore.c:608: Unable to convert from GtkSharpValue to gchararray
(eAppGtk:2528): Gtk-WARNING **: gtkliststore.c:608: Unable to convert from gchararray to gint
如果您能深入了解问题所在,我们将不胜感激,谢谢。
【问题讨论】:
标签: c# grid gtk# gtktreeview cellrenderer