Re: [gtkmm] iterating through a ListView

This works fine. Thx a lot!

You have to obtain a path object and work on that, viz:

  Gtk::TreeModel::Path tree_path(curr_iter);
  tree_path.prev(); // tree_path now refers to the row of the list store
                    // preceding the selected one
  Gtk::TreeModel::iterator prev_row_iter = [list_store]->get_iter(tree_path);

[list_store] is a Glib::RefPtr<Gtk::ListStore> reference to your list store (if that's what you are using).

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