Using VBox as a drop target

Flex / AIR Add comments

I am creating a drag/drop app currently, using a List as my drag initiator, but using a VBox as the dropTarget.  Strangely enough, I could only get the dragEnter event to fire when I moused over the border.  But the interior was "dead"--that is not droppable.

                <mx:VBox  id="conditionsContainer" label="if" 
                    width="100%" height="100%" horizontalAlign="right"
                    borderStyle="solid" 
                    dragEnter="dragEnterHandler(event)" dragDrop="dragDropHandler(event)" />

But it worked fine in this example.  Turns out, there was no "element" to drop on.  I had to provide a background of some sort to the VBox for it to pick up the event.

                <mx:VBox  id="conditionsContainer" label="if" 
                    width="100%" height="100%" horizontalAlign="right"
                    borderStyle="solid"  backgroundColor="#FFFFFF"
                    dragEnter="dragEnterHandler(event)" dragDrop="dragDropHandler(event)" />

5 responses to “Using VBox as a drop target”

  1. Fabio Cevasco Says:
    Thanks a lot, you truly saved my day!
  2. Chris Johnson Says:
    you're the man!
  3. Matt Sturgeon Says:
    brillient
  4. social marketing strategies Says:
    this is nice information need to know more
  5. Yamuna Says:
    Thanks man..

Leave a Reply





Powered by Mango Blog. Design and Icons by N.Design Studio