0 Replies Latest reply on Feb 2, 2012 3:44 PM by AlastairJMoore

    Adding skin to SkinnableContainer disables drag/drop ability.

    AlastairJMoore

      Hi all,

       

      I'm having a bit of a problem with a SkinnableContainer. The code defining the SkinnableContainer looks like:

       

        <s:SkinnableContainer

                                              id="actionContainer1" width="100" height="100"

                                              dragEnter="dragEnterHandler(event, 'actionGroup1')" dragDrop="dragDropHandler(event, 'actionGroup1')">

                                              <s:HGroup id="actionGroup1" height="100%" width="100%">

        </s:HGroup>

        </s:SkinnableContainer>

       

      and I have a skin defined as:

       

      <?xml version="1.0" encoding="utf-8"?>

      <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"

                          xmlns:s="library://ns.adobe.com/flex/spark" height="100" width="100">

        <!-- host component -->

        <fx:Metadata>

                          [HostComponent("spark.components.SkinnableContainer")]

        </fx:Metadata>

       

        <!-- states -->

        <s:states>

                          <s:State name="disabled" />

                          <s:State name="normal" />

        </s:states>

       

        <!-- SkinParts

                name=contentGroup, type=spark.components.Group, required=false

                -->

       

                <s:Rect left="0" right="0" top="0" bottom="0" radiusX="5" radiusY="5" >

        <s:stroke>

                                    <s:SolidColorStroke color="#ff00ff" weight="4" />

        </s:stroke>

        </s:Rect>

       

                <s:Group id="contentGroup" left="0" right="0" top="0" bottom="0">

        <s:layout>

        <s:BasicLayout />

        </s:layout>

        </s:Group>

       

      </s:Skin>

       

      If I add styleName="DropboxSkin" to the skinnablecontainer (actionContainer1), then it appears that my dragEnterHandler refuses to accept the drag source. Is there any reason this might be occurring? Removing it returns the functionality back to how it was and the drag source is accepted.

       

      Thanks very much,

       

      Alastair