Re: [gtkmm] TreeView



Hi Bart

> if I let the append retunr a 'iterator' I can't adjust the value of
> the columns anymore, like: 'row[column] = "blabla". And I don't find
> how to get the row from a iterator or vice versa. 
> also the function you use here, 'mrefTreeStore->get_path( iter )' that
> function isn't documantated od did I overlook it?
> 
> thx for your help, Bart

get_path is a method of the TreeModel class and because TreeStore
inherits from TreeModel you can use this method as I described.

http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1TreeModel.html#a13


If you have an iterator you just need to do the following to get the
iterator:

Gtk::TreeModel::Row row = *iter;

If you have a row and you want the iterator, i don't know how to do that
right now.. you should probably search the docs again ;) Perhaps you
don't event need to do a conversion because TreeRow is a subclass of
TreeIter?

Anyway, have you read the gtkmm tutorial? I learned nearly everything I
know there. I highly recommend reading it and trying out the examples
listed.

http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/

TreeView:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch08.html

hth





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