[Mono-bugs] [Bug 445384] New: After DoDragDrop wrong data format in DragEventArgs. Data on DragOver event
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Nov 14 22:07:18 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=445384
Summary: After DoDragDrop wrong data format in DragEventArgs.Data
on DragOver event
Product: Mono: Class Libraries
Version: 2.0
Platform: Other
OS/Version: Windows Vista
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: apper at apper.de
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=252439)
--> (https://bugzilla.novell.com/attachment.cgi?id=252439)
Test Case
Imagine the following situation:
You're starting drag&drop by using:
this.DoDragDrop(someObject, DragDropEffects.Copy | DragDropEffects.Move);
Now you're waiting for the DragOver event (in this case on the same control,
but I think this doesn't matter). The DragOver event occurs correctly and you
got the DragEventArgs. Interesting is the Data property, which should contain
the "someObject" object given to the DoDragDrop method. This doesn't work in
Mono using Windows.
e.Data.GetFormats() gets e.g. "Object1" when using MS.NET, using Mono it is
always "FileDrop". The e.Data.GetDataPresent("Object1") doesn't work, too. So
you don't have a possibility to check, if the dragged object is of the correct
type.
A simple sample could be found in the attached test case:
Do the dragDrop (in Form1_MouseDown):
this.DoDragDrop("", DragDropEffects.Copy);
checking the format (in Form1_DragOver):
MessageBox.Show(e.Data.GetFormats()[0]);
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list