Re: [gtkmm] getting the content of a Row in a Treeview

On Sat, 2003-06-07 at 07:03, Andre Leubner wrote:
> it's working(atleast it compiles fine) .), but how do i get the content(ustring) from the iter/row, 
> i couldn't find any method to get it.

Use the [] operator on the Row class, passing it one of the
TreeModelColumns you used to build the TreeModel. If we assume that we
have a Gtk::TreeModelColumnRecord called columns, which contains a
Gtk::TreeModelColumn<Glib::ustring> called name_column which contains
the information you wish to extract, and you also have an iter pointing
at the row you want to extract it from:

Glib::ustring data = (*iter)[columns.name_column];

will get it for you.

Matthew Walton <matthew alledora co uk>

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