Hello,
I am trying to use drag-n-drop for a listview control in my program. I
created a new listview control class (just call it MyListView) that
inherits from ListView, and creates a few new properties and methods.
I have set AllowDrop to true, and have all of the Drag* events
written. In addition, the listview is in the detailed view. A simple
explanation of what I want to do is to drag a file from the desktop or
explorer into my program and add the filename to the list (there is
actually a lot more, but if I could do this simple step I would be
fine from there). When I run the program, if I drag the file onto an
instance of a MyListView object, the cursor does not change to the +
sign, but keeps the crossed-out circle, meaning I cannot drag and
drop. The DragEnter event is not triggered either. If I set a
breakpoint somewhere in the middle of execution, the AllowDrop
property is still set to true. Finally, I am using a table layout
panel, which may or may not matter.
That's all of the possible relevant info I could think to add. Can
anyone think of any ideas for why this would not work?
Thanks!