Re: Getting the TreeModelColumns from a Glade file

On 06/15/2010 04:33 PM, José Alburquerque wrote:
On Tue, 2010-06-15 at 11:24 +0200, Dominik Gabi wrote:
Is there an easier way to manipulate a TreeRow or am I just missing
something here?

Unfortunately Gtk::TreeView::get_column() returns a TreeViewColumn
whereas Gtk::TreeRow::operator[] takes an TreeModelColumn as argument.
I've solved the problem with the following code which is not as nice as
the book solution but works fine for now.
You could have used the Gtk::TreeRow::operator[] as in the book if you
had defined your own Gtk::TreeModelColumnRecord (see its docs[1]).  For
example, take a look at the small test (along with the glade file) I
wrote to confirm my first answer.  It uses a Gtk:ListStore for the model
but it should show what I'm trying to explain.  Hope it helps.


Thanks. I somehow thought this would introduce compatibility problems if the columns are defined in Glade as well as in the code.


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