开发者

How do you make drag and drop always copy (never remove) in a Flex 4 Spark List?

Using the built in开发者_如何学Go drag and drop features in Flex I can drag an item from one list and drop it into another list. But this removes the item from the first list. In my case I need to keep the items in the original list. So I need to always create a copy behavior for my users.


There is a property called, "dragMoveEnabled" that was set to "true".

From the documentation:

The description of this property is, "A flag that indicates whether items can be moved instead of just copied from the control as part of a drag-and-drop operation. If true, and the dragEnabled property is true, items can be moved. Often the data provider cannot or should not have items removed from it, so a MOVE operation should not be allowed during drag-and-drop."

When set to false or removed I'm getting the behavior that I want which is Copy always without having to also press the CTRL key for it to work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜