Re: How do I move rows up or down in a Gtk::ListViewText



I haven't used gtkmm in awhile, but if I recall there are iterator methods for keeping state, and there should be insert methods. So in pseudo-code:

  1. Get currently selected row, save in curRow [1]
  2. Delete curRow from Gtk::ListView, keep it in memory, though
  3. Re-insert curRow at desired position [2]

Hope that helps.

Kevin

[1] https://developer.gnome.org/gtkmm-tutorial/3.4/sec-treeview-selection.html.en

[2] https://developer.gnome.org/gtkmm/stable/classGtk_1_1ListStore.html#ab71d860741465ea79bc352c4575e47ec



On Mon, May 27, 2013 at 10:35 AM, Francis (Grizzly) Smit <grizzly smit id au> wrote:
yep I'm now trying to move the selected row up or down in a
Gtk::ListViewText but not sure how to do it
thx in advance for any help.


--


  .~.     In my life God comes first....
  /V\         but Linux is pretty high after that :-D
 /( )\    Francis (Grizzly) Smit
 ^^-^^    http://www.smit.id.au/

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
https://mail.gnome.org/mailman/listinfo/gtkmm-list



--
Kevin Brightwell
BESc. and BSc. Candidate 2015
Western University www.westernu.ca
e. kevin brightwell2 gmail com c. 226.678.4927


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