[Gtk-sharp-list] Drag&Drop Problem

Elmar Haneke elmar at haneke.de
Fri Jun 26 11:06:21 EDT 2009


Hi,

I'm trying to implement some Drag&drop from TreeView to TextView in an
application running on MS-Windows.

Dropping Data in TextView is done twice. This is also the case if I do
drag from one TextView to another one.

Initialization is done by

static TargetEntry[] targetTable = new TargetEntry [] {
	new TargetEntry ("text/plain", TargetFlags.App, 0)
};

...


treeview1.EnableModelDragSource(Gdk.ModifierType.Button1Mask,
			        targetTable,
			        Gdk.DragAction.Copy);

	
Gtk.Drag.DestSet(textview1,DestDefaults.Drop,targetTable,Gdk.DragAction.Copy);
Gtk.Drag.DestSet(textview2,DestDefaults.Drop,targetTable,Gdk.DragAction.Copy);


The Treeview has "OnDragDataGet" defined to get data from current item.


How Can I solve that Problem?


Elmar


More information about the Gtk-sharp-list mailing list