[Gtk-sharp-list] NodeView/TreeView. Image and Text into the same column

Aniello Di Nardo dinardo at creasoftware.net
Thu Jun 18 19:38:10 EDT 2009



I'll pack an image and text into the same column of a NodeView/TreeView


I've write the follow code, but it have two column. anyone can help me?


Gtk.TreeStore tsItems = new Gtk.TreeStore (typeof (Gdk.Pixbuf), typeof

trwMain.AppendColumn ("Image", new Gtk.CellRendererPixbuf (), "pixbuf", 0);

trwMain.AppendColumn ("Text", new Gtk.CellRendererText (), "text", 1);

trwMain.HeadersVisible = false;


Gtk.TreeIter iter = tsItems.AppendValues
(Gdk.Pixbuf.LoadFromResource("Tables.png"), "Tables");

tsItems.AppendValues (iter, Gdk.Pixbuf.LoadFromResource("Names.png"),

tsItems.AppendValues (iter, Gdk.Pixbuf.LoadFromResource("Jobs.png"),


trwMain.Model = tsItems;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20090619/c09faef9/attachment.html 

More information about the Gtk-sharp-list mailing list