2 Replies Latest reply on Feb 8, 2010 4:39 PM by serwylo

    doubleClick on spark Label

    serwylo Level 1

      G'day again,

       

      I've come across some weird behaviour when attempting to implement double click listeners on a spark list (http://forums.adobe.com/thread/570405?tstart=0). As an example, if I create a list and add a double click listener, it will not fire if my mouse is over the item label:

       

      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">
      
           <fx:Script><![CDATA[ import mx.controls.Alert; ]]></fx:Script>
      
           <s:List doubleClickEnabled="true" doubleClick="Alert.show( 'List clicked')">
                <s:ArrayList>
                     <fx:String>one</fx:String>
                     <fx:String>two</fx:String>
                     <fx:String>three</fx:String>
                </s:ArrayList>
           </s:List>
      
      </s:Application>
      

       

      Incidently, this behaviour can be replicated simply with a Group and a child Label.

      It seems that the problem stems from the fact it is not possible to capture double clicks on a spark label:

       

      <s:Application
          xmlns:fx="http://ns.adobe.com/mxml/2009"
          xmlns:s="library://ns.adobe.com/flex/spark"
          xmlns:mx="library://ns.adobe.com/flex/halo">
      
           <fx:Script><![CDATA[ import mx.controls.Alert; ]]></fx:Script>
      
           <s:Label y="5" text="I AM A LABEL" fontSize="22" doubleClickEnabled="true" doubleClick="Alert.show( 'Spark Label clicked' );" />
           <mx:Label y="50" text="I AM A LABEL" fontSize="22" doubleClickEnabled="true" doubleClick="Alert.show( 'MX Label clicked' );" />
      
      </s:Application>
      

       

      So my questions are:

      1. Is this behaviour reproducible by anyone else?
      2. Would this inability to double click a spark label prevent the parent component from registering a double click?
      3. Is the lack of double click behaviour intentional?

       

      I am on Linux with flashplayer 10,0,22,87 and Windows XP with flashplayer 10,0,42,34.

       

      Thanks for your help.