HowTo: Pack Gtk CellRenderers vertically in a Gtk TreeView

[...]
var treeview = Gtk.TreeView();
var column = new Gtk.TreeViewColumn();

var cellrenderer_1 = Gtk.CellRendererPixbuf();
var cellrenderer_2 = Gtk.CellRendererText();

column.add_attribute(cellrenderer_1, "pixbuf", 0);
column.add_attribute(cellrenderer_2, "markup", 1);

(column.get_area() as Gtk.Orientable).set_orientation(Gtk.Orientation.VERTICAL);

column.pack_start(cellrenderer_1, false);
column.pack_start(cellrenderer_2, false);

treeview.append_column(column);
[...] 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: