Glade, Gtk::Builder and GtkTreeView

This is my first time using Ruby-Gnome2, so please be gentle…

I am trying to use a GtkTreeView I created in glade. I created the
hierarchy in glade and would rather do this way than create the columns
in ruby code.

I think my ruby code needs to set a cell renderer for each column as my
tree is blank. I can’t work out how to set a column’s renderer. Can I do
this, or will I have to create the columns in ruby?

Thanks, Mike Wilson

Mike Wilson wrote in post #1014007:

This is my first time using Ruby-Gnome2, so please be gentle…

I am trying to use a GtkTreeView I created in glade. I created the
hierarchy in glade and would rather do this way than create the columns
in ruby code.

I think my ruby code needs to set a cell renderer for each column as my
tree is blank. I can’t work out how to set a column’s renderer. Can I do
this, or will I have to create the columns in ruby?

In glade, you right-click on your treeview, or any column, and choose
“Edit …”. In the hierarchy tab, you select a column, right-click, and
“Add child whatever”, most likely Text.

Don’t forget to rename it. Don’t forget to edit the “text” property, so
as it points to what you want from the liststore. See attachment.

Simon

Simon A. wrote in post #1014144:

In glade, you right-click on your treeview, or any column, and choose
“Edit …”. In the hierarchy tab, you select a column, right-click, and
“Add child whatever”, most likely Text.

Don’t forget to rename it. Don’t forget to edit the “text” property, so
as it points to what you want from the liststore. See attachment.

Simon

Brilliant – just what I needed. Thanks