2 Replies Latest reply on Aug 28, 2010 6:05 AM by dgamma

    How to check if spark navigator content has been clicked


      I've been trying to run a function to call when the navigator conent has been clicked or changed, but none of these events seem to be working? any ideas?



        • 1. Re: How to check if spark navigator content has been clicked
          ShardulSingh Level 3


          All is working fine.Pls check with the example below. You can click on the red navigator content then you will find a Alert. And also when you will

          add a button isnide the navigator content then also you will find another Alert.Let me know if you have any issue with this.




          <?xml version="1.0" encoding="utf-8"?>
          <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                         minWidth="955" minHeight="600">


                      import mx.controls.Alert;
                      import mx.events.FlexEvent;
                      import spark.components.Button;
                      protected function navigatorcontent1_clickHandler(event:MouseEvent):void
                          Alert.show("Working fine.");


                      protected function navigatorcontent1_updateCompleteHandler(event:FlexEvent):void
                          Alert.show("navigatorContent is updated.")


                      protected function addToNavigatorcontent(event:MouseEvent):void
                          var btn : spark.components.Button = new spark.components.Button();
                          btn.label = "Added on navigatorContennt";
                          btn.width = 100;
                          btn.height = 50;




                  <!-- Place non-visual elements (e.g., services, value objects) here -->
                  <s:NavigatorContent id="navigatorContent" width="400" height="150" backgroundColor="0xFF0000" click="navigatorcontent1_clickHandler(event)" updateComplete="navigatorcontent1_updateCompleteHandler(event)">
                  <mx:Button label="Add something to NavigatorContent" width="250" click="addToNavigatorcontent(event)" />








          with Regards,


          Shardul Singh Bartwal

          1 person found this helpful