Hi all
Has anyone had any success with GTK2.TreeView in Pike (7.8.316)?
I've got as far as setting the TreeView's model (thanks to
http://www.nabble.com/Getting-GObjects-from-mixin-objects-td3589654.html
James Trike's fix ) - a ListStore with one string - but can't work out how
to use TreeView->append_column().
The module docs seem to suggest you need to set up your own CellRenderer,
whereas in gtkmm you can just use a default renderer for basic types.
Here's a snippet:
my_user_list = GTK2.ListStore( () );
my_tree_view->set_model(my_user_list);
// next 2 lines garbage - but they do give you column header
GTK2.CellRendererText crt = GTK2.CellRendererText();
my_tree_view->append_column( GTK2.TreeViewColumn("Usernames", crt, "", 0) );
// this never gets drawn
GTK2.TreeIter iter = my_user_list->append();
my_user_list->set_value(iter, 0, "someuser");
Thanks in advance for any help,
Matthew
--
View this message in context:
http://www.nabble.com/GTK2.TreeView-tp25519989p25519989.html
Sent from the Pike - User mailing list archive at Nabble.com.
|