Board index » DotNet » Drag and Drop into Listview

Drag and Drop into Listview

DotNet369
I am having problems with drag and drop into a listview. I am able to

drag and drop items from within the listview, as well as drag items

from the listview and drop into a picturebox. However, I am not able

to drag the text or image from the picturebox to the listview. In the

listview_dragenter function, I have e.Effects = DragDropEffects.Copy (I

have also tried e.Effects = DragDropEffects.Move, but it does not help

either), which is the same as what I have for the picturebox_dragenter

function. However, when I try to drag from the picturebox to the

listview, the cursor gives the same effect as DragDropEffects.None, and

the listview.DragDrop function never gets called. Does anyone have any

ideas of anything I am doing wrong? Thanks.


-
 

Re:Drag and Drop into Listview

Take a look:

msdn2.microsoft.com/en-us/library/system.windows.forms.control.dragdrop(d=ide).aspx">msdn2.microsoft.com/en-us/library/system.windows.forms.control.dragdrop(d=ide).aspx



chanmm



"TarheelsFan" <TravisE@bluepinesystems.com>wrote in message

Quote
I am having problems with drag and drop into a listview. I am able to

drag and drop items from within the listview, as well as drag items

from the listview and drop into a picturebox. However, I am not able

to drag the text or image from the picturebox to the listview. In the

listview_dragenter function, I have e.Effects = DragDropEffects.Copy (I

have also tried e.Effects = DragDropEffects.Move, but it does not help

either), which is the same as what I have for the picturebox_dragenter

function. However, when I try to drag from the picturebox to the

listview, the cursor gives the same effect as DragDropEffects.None, and

the listview.DragDrop function never gets called. Does anyone have any

ideas of anything I am doing wrong? Thanks.







-

Re:Drag and Drop into Listview

Thanks for the link. I actually already had that in. I was messing

around with it, and found out that when I made a new Listview then I

was able to drag and drop into that. I have all of the properties (as

far as I can tell) the same as the original, so I am not sure what the

difference between the two is. Maybe something in my code had

invalidated drag and drop into the original listview.



chanmm wrote:

Quote
Take a look:

msdn2.microsoft.com/en-us/library/system.windows.forms.control.dragdrop(d=ide).aspx">msdn2.microsoft.com/en-us/library/system.windows.forms.control.dragdrop(d=ide).aspx



chanmm



"TarheelsFan" <TravisE@bluepinesystems.com>wrote in message

news:1150807742.751424.295660@g10g2000cwb.googlegroups.com...

>I am having problems with drag and drop into a listview. I am able to

>drag and drop items from within the listview, as well as drag items

>from the listview and drop into a picturebox. However, I am not able

>to drag the text or image from the picturebox to the listview. In the

>listview_dragenter function, I have e.Effects = DragDropEffects.Copy (I

>have also tried e.Effects = DragDropEffects.Move, but it does not help

>either), which is the same as what I have for the picturebox_dragenter

>function. However, when I try to drag from the picturebox to the

>listview, the cursor gives the same effect as DragDropEffects.None, and

>the listview.DragDrop function never gets called. Does anyone have any

>ideas of anything I am doing wrong? Thanks.

>



-