Since the OnMouseDown event is triggered only if the mouse comes from outside the listview but not if the mouse comes from the listview, how can I catch a DragNDrop inside a listview ?
You might check whether DragnDropFromControl (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Event/DragnDropFromControl.htm) also gets called when dragging from the same control.
If this event is triggered the droped image is deleted.
Dont understand why.
I give up.
Thanks anyway for your help.
Hi, copter I recommend you to search the forum for drag and drop and to have a look at the samples.
You'll find at least two different ways to use drag'ndrop functionality in OpenDCL.
Automatic way:
The behaviour you mentioned works as designed: the dragged item will be moved off the source control. The idea was to move the selected item from one to another or within a control.
Have a look at the opendcldemo command and check out the Drag&Drop sample.
I do never use this, because I always have a database in the background (access or sqlite or mysql) which has to update structures or object relationships. Thats why I alsways use the
Manual way:
I can activate some events to control the behaviour when start dragging, while dragging and when dropping. But because I can do this, I have to do this. This might cause some researches and test but you will recognize the necessity to do this.
Maybe I find the time today to rewrite a small sample.
Regards, Fred
Thanks Fred
Yes it should be very helpful if you have any sample.