[Glade-users] Confused about GtkTreeStore definition in Glade

On Wed, 27 Jun 2012 23:17:51 -0300
John Coppens <john at jcoppens.com> 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

            { 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

        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 );
. . .


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]