I have a Flex question. I was wondering, if I have two list boxes, and I want to drag and drop between both of them, how do I prevent the user from dragging onto the same list (thus duplicating the item? I cannot have a situation where that is the case. Thanks guys
R – Flex:: How to prevent in drag and drop, dragging onto self
apache-flexdrag and drop
Best Answer
Haven't tested it but I guess something like this should work:
Listen to
dragStart
event on both lists and set asource
variable depending onevent.target
. Now listen to thedragDrop
event on both lists and callevent.preventDefault()
if thesource
is same as thetarget
.