Hello.

I'm far from expert at those things, but to achieve simple reordering,
I think it's enough to call gtk_tree_view_set_reorderable on your
GtkTreeView (if you created custom tree store for your treeview, you
need to implement GtkDragSource and the GtkDragDest interfaces in it
to make things work). Using this method also disables all other DND
activities (you cannot drag rows to other widgets).

To implement "copy when Ctrl is pressed" behavior, you'll need to look
at the API for DND. See docs for more info (there is not much info,
but still better than nothing;):
http://library.gnome.org/devel/gtk/stable/gtk-GtkTreeView-drag-and-drop.html

I'll play around a bit and see what can I work out.


2008/12/9 John M Collins <[EMAIL PROTECTED]>:
> Could a kind person point me at some specimen code to do drag & drop
> with a GtkTreeView? The Tree View tutorial fizzles out on that issue.
>
> All I want to do is let the user use the mouse to shuffle round the
> order of items in a list - I don't require to drag anything to another
> widget in fact I want to ban that if possible.
>
> It would be nice if I could have the user hold down the CTRL key to mean
> "copy" rather than "move" - is there any way of doing that?
>
> Thanks for any help.
>
>
> John Collins Xi Software Ltd www.xisl.com
>
>
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>



-- 
Tadej Borovšak
00386 (0)40 613 131
[EMAIL PROTECTED]
[EMAIL PROTECTED]
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to