1 Reply Latest reply on Dec 10, 2013 2:38 PM by MauricioGraciaG

    Double click event not fired/triggered when double clicking on left side of tree node

    MauricioGraciaG

      I have the following Flex tree

       

      <mx:Tree id="Tree" left="0" right="0" top="0" bottom="0"
              
      alternatingItemColors="[#EEEEEE, white]" dataProvider="{lsEspecie}"
              
      dragEnabled="true" dragMoveEnabled="true" dropEnabled="true" labelField="item"
              
      labelFunction="tree_labelFunc" showRoot="false"
              
      doubleClickEnabled="true" doubleClick="Tree_DoubleClick(event)">
      </mx:Tree> 

       

      When I double click on the ICON and to the right of side on any node, double click event is being fired as expected. But when clicking on any part of the left side of the node double click is not being fired

       

      DoubleClickNotFiring.png

      Is there any way to make the double click event fire when is happening to the left side of the node  ?

        • 1. Re: Double click event not fired/triggered when double clicking on left side of tree node
          MauricioGraciaG Level 1

          The issue was solved with this FixedTree class

           

          import flash.display.InteractiveObject;
          import flash.events.Event;

          import mx.controls.Tree;
          import mx.core.mx_internal;

          use namespace mx_internal;

          public class FixedTree extends Tree {

            
          public function FixedTree() {
               
          super();
            
          }

            
          override protected function createChildren():void {
               
          super.createChildren();

                getListContentHolder
          ().selectionLayer.addEventListener(Event.ADDED, selectionLayerChildAddedHandler);
            
          }

            
          private function selectionLayerChildAddedHandler(e:Event):void {
               
          // ListBase:5790 creates a SpriteAsset for the selectionLayer but does not set mouseEnabled to false

               
          InteractiveObject(e.target).mouseEnabled = false;
            
          }

          }