Re: Getting model values without columns object...



Am 14.06.2013 18:51, schrieb Glus Xof:
Hi guys,

Is it possible to access to any specific column data only with a
TreeModel reference and a TreeIter object ?

For example, I have,

Glib::RefPtr<Gtk::TreeModel> & refTreeModel
Gtk::TreeIter & iter

I know that in my data model, there is a column named "col1". Is it
possible to retrieve the value store in "col1" without mention the
columns object (Gtk::TreeModelColumnRecord) ?


There is a template method

template<class ColumnType>
void Gtk::TreeRow::get_value(int column, ColumnType& data) const;

TreeIter dereferences to TreeRow. Use that if with the correct type. I'm
not seeing a way to retrieve the names of columns, though.

Hope this helps,
Florian Philipp

Attachment: signature.asc
Description: OpenPGP digital signature



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