[Gtk-sharp-list] Question about TreeNode

Arrigo Razzini arrigo.razzini at gmail.com
Fri Oct 21 05:49:53 EDT 2005


Hello to all ,

in a TreeView I can pack two (or more) CellRenderer in a single
TreeViewColumn (for example I can pack a pixbuf cell for the icon and
a text cell for generic text) ...

<snippet>
TreeViewColumn column = new TreeViewColumn();
....
column.AddAttribute (cellPixbuf, "pixbuf", 0);
column.AddAttribute (cellText, "text", 1);
.....
store.AppendValues (new Gdk.Pixbuf("image.png"), "hello world");
</snippet>

... but now I'm trying to use a NodeView/NodeStore instead of
TreeView/TreeStore and I don't understand as it is possible to make
the same without creating another Column in the TreeNode.

<snippet>
[TreeNode (ColumnCount=1)]
public class GenericNode : TreeNode {

string name;

public GenericNode (string name)
{
     this.name = name;
}

[TreeNodeValue (Column=0)]
     public string Name
     {
             get { return name; }
     }
}
......
NodeStore store = new NodeStore(typeof (GenericNode));
...
PopulateStore();
...
NodeView view = new NodeView (Store);
</snippet>

is it possible to have two or more CellRenderer for the same Column
using a TreeNode ?

Arrigo

P.S.: sorry for my badly english


More information about the Gtk-sharp-list mailing list