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*
...
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to