by
allistar >> Sun, 4 Aug 2002 22:25:11 GMT
allistar, can you give me any pointers on how you did that?
Let's ay you have two controls, one you want to drag from and one you want to drop to. These are "controlFrom" and "controlTo".
On controlFrom I put code in the mouseDown event:
dragMode := 1;
on controlTo I put code in the dragDrop event
objectGotDropped();
(That method does whatever you need to happen when the drop happens,
like changing the text of the control or adding an item to it (if it's
a list box or table)).
That is very simplified, and there are other ways of doing it. One
thing that we do is on the mouseDown event we begin a "one shot" timer set for 100ms, and when that timer fires we set the dragMode to 1. If
you get a mouseUp event before the timer fires, disable the timer (or
set a property to "true" wo that when the timer does fire you don't do anything). This is so you can distinguish between drags and normal clicks. When you are just clicking on the control you don't want the cursor to change to a "drag" cursor.
Hope this helps, the Jade help files are pretty good at explaining it.
Regards,
Allistar. ------------------------------------------------------------------
Allistar Melville
Software Developer
Auckland, NEW ZEALAND
Greentree International,
Developer of Greentree Financial Software. ------------------------------------------------------------------