Hi,
I'm trying to develop a kind of windows explorer to manage folder structures together with files (according to the windows explorer).
I'm using two controls: an ultratreeview and an ultalistview.
My problem is the drag and drop functionality.
The drag drop functionality in the tree itself works suitable.
The possiblity of selecting / dragging listviewitems and dropping them on a special treenode on the treeview works not properly. If I put down the mouse button and move from the listview towards the treeview, the short icon, that shows if this item could be placed here or not, stays in the Effects.None mode.
This penomena is very strange to me, because if I first move (with drag and drop) within the tree, then after this action all listviewitems can be taken and put in the tree, as it is my wish.
Why doesn't this work initially without acting in the treeview before ?
In the ultratreeview I use the following events:
SelectionDragStart -> DoDragDrop (Tree)
DragOver
DragDrop
In the ultralistview I use the following events: (My Plan: The drag and drop functionality only works for putting listviewitems and dropping them in the ultratree NOT the other way round; so I think I need no dragover and dragdrop here for the ultralistview.
mouse_down
mouse_move ->dodragdrop (Tree)
which event can I use here for strating the dragging process ? is it ok to call the dragdrop functionality of the tree ?
Altogether again: The functionality really works, but only if first of at least one tree node is dragged (I guess the condition is that the SelectionDragStart() tree-function must be called first).
Or should I trigger this event in the mouse_move event of the ultralistview or is there an analogous function like SelectionDragStart() for the ultralistview items?
Can those dragover events etc... be debugged ? I do not think so, because those are called every time, messageboxes wihtin often lead to system exceptions and exit the programm ..... How can I verify that the contents of these functions work properly ?
I would be thankful for any kind of help.
Thank you very much,
Best regards,
Tobias Rüger
This same article was posted to the WinListView newsgroup; please see that thread.