[Vala] Take data from a TreeStore



Hello again.
I'm testing the GtkTreeView with GtkTreeStore but don't find in the doc how to get value of an selected row.
With Gtkmm I found an example in 
http://git.gnome.org/browse/gtkmm-documentation/tree/examples/book/treeview/tree/examplewindow.cc
.
.
.

void ExampleWindow::on_treeview_row_activated(const Gtk::TreeModel::Path& path,
        Gtk::TreeViewColumn* /* column */)
{
  Gtk::TreeModel::iterator iter = m_refTreeModel->get_iter(path);
  if(iter)
  {
    Gtk::TreeModel::Row row = *iter;
    std::cout << "Row activated: ID=" << row[m_Columns.m_col_id] << ", Name="
        << row[m_Columns.m_col_name] << std::endl;
  }
}

.
.
.

but I don't fin in Vala the Widget Row.
I try wiht the CellRendererText.text but don't work too.
There is an example about or any documentation ?

Thanks.

pd: Sorry by my bad english




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