[Gtk-sharp-list] Gtk# treeview and node icon
debelizmaj
demjurg at gmail.com
Mon Aug 15 06:18:17 EDT 2011
I'm new in gtk# and have a problem. I wanna dilplay icon in my tree view,
like in Solution explorer in mono develop. But i can't.
There is my code:
TreeStore store = new TreeStore(typeof(Pixmap),
typeof(string));
treeview.Model = store;
CellRendererPixbuf pix_render = new CellRendererPixbuf ();
TreeViewColumn complete_column = new TreeViewColumn();
complete_column.PackStart (pix_render, false);
complete_column.AddAttribute(pix_render, "image", 0);
CellRendererText text_render = new Gtk.CellRendererText ();
complete_column.PackStart (text_render, true);
complete_column.AddAttribute (text_render, "markup", 1);
treeview.AppendColumn (complete_column);
Gtk.TreeIter oldIter = Gtk.TreeIter.Zero;
Pixbuf icon = Stetic.IconLoader.LoadIcon (this, "gtk-about",
global::Gtk.IconSize.Menu);
TreeIter iter = store.AppendValues(icon,"Root");
How to fix this?
--
View this message in context: http://mono.1490590.n4.nabble.com/Gtk-treeview-and-node-icon-tp3744283p3744283.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.
More information about the Gtk-sharp-list
mailing list