[gtkmm] getting the content of a Row in a Treeview
- From: Andre Leubner <cyberrobbe gmx de>
- To: gtkmm-list gnome org
- Subject: [gtkmm] getting the content of a Row in a Treeview
- Date: Sat, 7 Jun 2003 04:43:59 +0200
Hi,
ok, i have a TreeView, i'm catching the row_activated signal.
and now i need the content(ustring) of the selected row.
here some code i already tried, without success:
void SimpleEdit::on_row_activated(const Gtk::TreePath & path,Gtk::TreeViewColumn * col) //row_activated sig
{
//Gtk::TreeSelection * selection;
Glib::RefPtr<Gtk::TreeSelection> selection;
selection=m_listview.get_selection();
//selection->get_selected();
Gtk::TreeModel::iterator iter=selection->get_selected();
Glib::RefPtr<Gtk::TreeModel> model;
model=m_listview.get_model();
//g_print(model->get_string(iter));
//std::cout << model->get_string(iter)<<std::endl;//this gives me the number of the selected row in the list
//std::cout << (Glib::ustring*)(m_Columns.m_col_name)<<std::endl;//doesn't working
}
i want to do it this way:
//Glib::RefPtr<Gtk::ListStore> m_refTreeModel;
Gtk::TreeModel::Row row = m_refTreeModel->get_activated_row()//get_activated_row doesn't exist
Glib::ustring wanted_content=row[m_Columns.m_col_name];
but i can't find a way to get the activated row...
Andre Leubner
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]