Hi, 

 

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?
Thanks

 

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

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"),
"Names");

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

 

trwMain.Model = tsItems;

_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to