Re: Getting the TreeModelColumns from a Glade file
- From: José Alburquerque <jaalburquerque cox net>
- To: Dominik Gabi <dkgispam gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: Getting the TreeModelColumns from a Glade file
- Date: Sun, 13 Jun 2010 20:46:08 -0400
On Sat, 2010-06-12 at 06:40 +0200, Dominik Gabi wrote:
> I'd like to set and get the values of a Gtk::TreeStore that I've
> instantiated in Glade. I'd like to do this the way it is done in the
> gtkmm-tutorial (with the overloaded  operator of the TreeRow).
If you can get the model using Gtk::Builder::get_object(), it should be
possible to get to a desired row by dereferencing an iterator of the
model (see Gtk::TreeModel::get_iter() and the section on "Iterating
over Model Rows" in the online book). You would have to define a
Gtk::TreeModelColumnRecord corresponding to the model so that something
(*iter)[columns.a_column] = ...;
could be done.
> problem is that, I either generate the whole TreeView in the code (which
> I'd like to avoid, if somehow possible) and specify the necessary
> TreeModelColumns by hand, or I have to extract them somehow from what is
> generated in Glade. Since the columns are not objects in Glade, I was
> hoping I could access them using the model or the view... Unfortunately
> I can't find anything in the documentation.
It should be possible to get the columns of the TreeView (created in
glade) using Gtk::TreeView::get_column().
> Is there an easier way to manipulate a TreeRow or am I just missing
> something here?
] [Thread Prev