示例#1
0
        // Call this from a DragEnd event to check if the widget wasn't dropped
        public static Gtk.Widget Cancel()
        {
            if (dragWidget == null)
            {
                return(null);
            }

            Gtk.Widget w = dragWidget;
            dragWidget = null;

            // Remove the widget from its dragWindow
            Gtk.Container parent = w.Parent as Gtk.Container;
            if (parent != null)
            {
                parent.Remove(w);
                parent.Destroy();
            }
            return(w);
        }