Note that there are some explanatory texts on larger screens.

plurals
  1. POdrop in an HBox
    primarykey
    data
    text
    <p>I have this HBox with drop functionality:</p> <p>SCRIPT:</p> <pre><code>// The dragEnter event handler for the HBox container enables dropping. private function dragEnterHandler(event:DragEvent):void { if (!event.dragSource.hasFormat("items")) return; var dropTarget:Box = Box(event.currentTarget); dropTarget.setStyle("borderStyle", "outset"); DragManager.acceptDragDrop(dropTarget); DragManager.showFeedback(DragManager.MOVE); } private function dragExitHandler(event:DragEvent):void { if (!event.dragSource.hasFormat("items")) return; var dropTarget:Box = Box(event.currentTarget); dropTarget.setStyle("borderStyle", "inset"); } </code></pre> <p>MXML</p> <pre><code>&lt;mx:HBox id="invoiceHBox" borderStyle="inset" borderThickness="3" height="40" width="260" dragEnter="{dragEnterHandler(event);}" dragExit="{dragExitHandler(event);}" dragDrop="{dragDropHandler(event);}"&gt; &lt;mx:VBox&gt; &lt;mx:Image source="{MailIcon32}" visible="{Boolean(invoiceEmail)}" /&gt; &lt;mx:Label text="{invoiceEmail.name}" styleName="heading4" /&gt; &lt;mx:Text text="{invoiceEmail.description}" width="100%" selectable="false" /&gt; &lt;/mx:VBox&gt; &lt;/mx:HBox&gt; </code></pre> <p>When the mouse enters the HBox, it works fine. The data can be dropped into the HBox and the function dragDropHandler (a very long function) does its work.</p> <p>However, when the mouse hovers over the VBox, the drop functionality is lost. Can the VBox container somehow inherit from the HBox? or is there another solution to this problem?</p> <p>thanks!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload