[Resolved]Drag and Drop Event
Posted: Thu Dec 04, 2008 03:33
Hi, I have some problems with drag and drop events:
I have Drag Containers with their children(StaticImage), I'll call them "A"."B"."C"... in the following content.
(each Green Item is "A" or "B" or "C", and I could drag and drop them to
the empty Grid)
1st question:
I let "A" follow the mouse cursor after "Ctrl+Mouse Left Button" Clicked.
But the Drag Container can't follow the mouse cursor if I move the mouse cursor too fast.
(umm.. this is the issue of Mouse following)
In this picture, the yellow item is which should follow mouse cursor.
I upgrade to 0.6.2 today, and this question couldn't be resolved.
2nd question:
After I let "A" follow the mouse cursor, I couldn't get "DragDropItemEnters","DragDropItemLeaves" or
"DragDropItemDropped" event when I move it to Grids which
have subscribed these 3 events.
--I couldn't get the above events when I move the yellow item,
and it is a DragContainer with StaticImage, too.
3rd question:
I subscribed "MouseButtonUp" to "B", and hope it stack to the Grid(which already has "C") below it
when MouseButtonUp. I used "DragDropItemEnters" and "DragDropItemLeaves" to
remember which Grid "B" above, but when I move "B" to any Grid without leaving it, the
"DragDropItemEnters" and "DragDropItemLeaves" handlers always being called.
This is my log:
10:33:38 ***** Enter some Grid ****
10:33:38 ***** Leave some Grid **** //this is strange
10:33:38 ***** Mouse Button Up ****
So I remembered the Grid and clear it right away.
-- I want to move the item from [0][2] to [1][2] to stack the 2 items,
but I got the log above.
Please Help me...
I have Drag Containers with their children(StaticImage), I'll call them "A"."B"."C"... in the following content.

(each Green Item is "A" or "B" or "C", and I could drag and drop them to
the empty Grid)
1st question:
I let "A" follow the mouse cursor after "Ctrl+Mouse Left Button" Clicked.
But the Drag Container can't follow the mouse cursor if I move the mouse cursor too fast.
(umm.. this is the issue of Mouse following)
In this picture, the yellow item is which should follow mouse cursor.

I upgrade to 0.6.2 today, and this question couldn't be resolved.
2nd question:
After I let "A" follow the mouse cursor, I couldn't get "DragDropItemEnters","DragDropItemLeaves" or
"DragDropItemDropped" event when I move it to Grids which
have subscribed these 3 events.
--I couldn't get the above events when I move the yellow item,
and it is a DragContainer with StaticImage, too.
3rd question:

I subscribed "MouseButtonUp" to "B", and hope it stack to the Grid(which already has "C") below it
when MouseButtonUp. I used "DragDropItemEnters" and "DragDropItemLeaves" to
remember which Grid "B" above, but when I move "B" to any Grid without leaving it, the
"DragDropItemEnters" and "DragDropItemLeaves" handlers always being called.
This is my log:
10:33:38 ***** Enter some Grid ****
10:33:38 ***** Leave some Grid **** //this is strange
10:33:38 ***** Mouse Button Up ****
So I remembered the Grid and clear it right away.
-- I want to move the item from [0][2] to [1][2] to stack the 2 items,
but I got the log above.
Please Help me...
