Re: Enable drag and drop for treeview?



Jeff,

I think to do this, you have to subclass Gtk::TreeModel and override
Gtk::TreeDragDest::drag_data_received_vfunc()

I did something similar here:
http://trac.lsdcas.engineering.uiowa.edu/browser/trunk/cas2/plugins/viewer/event_analysis/treemodel.hh
http://trac.lsdcas.engineering.uiowa.edu/browser/trunk/cas2/plugins/viewer/event_analysis/treemodel.cc

There's also an example in the book about doing this stuff which is
what I based my implementation on:

http://www.gtkmm.org/docs/gtkmm-2.4/examples/book/treeview/drag_and_drop/

HTH,
Paul Davis

On 5/2/07, Jef Driesen <jefdriesen hotmail com> wrote:
For my application, I want to be able to re-order rows in a treeview
(treestore model) using drag and drop. According to the gtkmm book, I
can use set_reorderable(). But how can I detect when a drag and drop
operation is finished (to update the underlying database)? I can't find
any signals to connect to. Am I missing something?

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




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