1
votes

I find that on a GTK# 2.12 TreeView, I do not receive the appropriate events. My setup is as follows:

        var tv = Handle.TreeView;
        var targets = new[] { new Gtk.TargetEntry(TargetType, Gtk.TargetFlags.App, 0) };
        Gtk.Drag.SourceSet(tv, Gdk.ModifierType.Button1Mask, targets, Gdk.DragAction.Move);
        Gtk.Drag.DestSet(tv, Gtk.DestDefaults.All, targets, Gdk.DragAction.Move);

I receive DragBegin, and on drop, I get DragFailed and then DragEnd. Never do DragMotion, DragDataGet, or DragDataReceived get called. Is there something I need to do to cause GTK# to raise these events?

1

1 Answers

0
votes

I haven't really worked with Drag&Drop, but there is a Drag&Drop tutorial for plain Gtk+ (porting should be more or less simple). Also, check Mono's docs about Gtk#'s Gtk.Drag.