TreeView - First element
- From: Adam Chyła <adam chyla gmail com>
- To: gtkmm-list gnome org
- Subject: TreeView - First element
- Date: Fri, 1 Jan 2010 20:59:33 +0100
Hello all,
How can I check that the selected element on TreeView is first or last?
I have that code:
File.H
...
Gtk::TreeView ListTreeView;
Gtk::TreeModel::Row row;
Glib::RefPtr<Gtk::ListStore> ListTreeModel;
...
File.CPP
... THIS CODE MOVE ELEMENT UP
Glib::RefPtr<Gtk::TreeSelection> ref = ListTreeView.get_selection();
Gtk::TreeModel::iterator iter = ref->get_selected();
if (ListTreeModel->children().begin() != iter)
ListTreeModel->iter_swap(iter, iter--); // But if iter is the first element from the list the code isn't work properly
...
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]