简体   繁体   中英

Flex Drag n Drop between Components

I have a flex project that is made of up several custom components that are mostly based on VBox with Lists of some form or fashion ranging from Tree to AdvancedDataGrid . My main view consists of two custom components which one contains a Tree and other an AdvancedDataGrid .

Using the standard built-in dnd in those components, I'm not able to perform dnd. So I implemented dnd using DragManager and the necessary events ( mouseDown , dragEnter , and dragDrop ) on those components and that works. However, this approach seems to complicate the other events such as double click and right click actions.

Is there a solution to have native dnd with this type of approach?

LeftSide.mxml:

<VBOX>
<Tree/>
</VBOX>

RightSide.mxml:

<VBOX>
<AdvancedDataGrid/>
</VBOX>

main.mxml:

<Application>
<HBOX>
<LeftSide/>
<RightSide/>
</HBOX>
</Application>

I don't think so.... But what I did a long time ago was only start the drag if the user is holding down the mouse and has held it down for a period of time or moved it a certian distance. I can't remember the specifics, but I'll try to dig out how I did it soon.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM