Re: Confused about GtkTreeStore definition in Glade
Ed Rippy <[email protected]> Sun, 1 Jul 2012 19:23:41 -0700
| Newsgroups | gmane.comp.gnome.glade.user |
|---|---|
| Organization | RBE |
| Message-ID | <20120701192341.2b570159@Fanga2> |
On Wed, 27 Jun 2012 23:17:51 -0300 John Coppens <[email protected]> wrote: > I cannot define columns of types which are documented > in the Gtk+ reference manual -- I have never gotten anything besides ints & doubles to work in Glade-defined tree- & liststores (I'm still running ver. 2). I just gave up & set them up in code (along w/ the TreeViewColumns to see them with). But I'll definitely watch this thread in case somebody else knows how to do it in Glade! Code snippets: (from header}: // Model columns inner class for _glade_objects_liststore class ModelColumns : public Gtk::TreeModel::ColumnRecord { public: ModelColumns() { add( gclass ); add( name ); add( properties ); add( signals ); add( attributes ); add( columns ); } Gtk::TreeModelColumn<Glib::ustring> gclass; Gtk::TreeModelColumn<Glib::ustring> name; Gtk::TreeModelColumn<Glib::ustring> properties; Gtk::TreeModelColumn<Glib::ustring> signals; Gtk::TreeModelColumn<Glib::ustring> attributes; Gtk::TreeModelColumn<Glib::ustring> columns; // for treemodel }; ModelColumns _glade_objects_treestore_columns; . . . (from constructor): _glade_objects_treestore = Gtk::TreeStore::create( _glade_objects_treestore_columns ); . . . _glade_objects_treeview->set_model( _glade_objects_treestore ); // add column views to treeview _glade_objects_treeview->append_column( "Class", _glade_objects_treestore_columns.gclass ); _glade_objects_treeview->append_column( "Name", _glade_objects_treestore_columns.name ); . . . Ed _______________________________________________ Glade-users maillist - [email protected] http://lists.ximian.com/mailman/listinfo/glade-users