2 Replies Latest reply on Oct 18, 2011 1:56 AM by elMou77

    TabNavigator  is keeping the previous state


      Greetings everybody,


      I have a tab navigator on my project. The content of each tab is long enough that you need to scroll down to see all content. The issue here isd that when you go to the end of page (tab) to select something and then you switch between tabs and go back to the specified tab the screen shows the end of page (the way you left it). As per customer requirement, she wants the page to show always from top.


      I hope the problem is clear and I hope that you can find a solution.



        • 1. Re: TabNavigator  is keeping the previous state
          Don Kerr Level 3

          I had a similar need when changing states using spark scroller.

          I basically just set the viewport vertical scroll position to the top.


          myScroller.viewport.verticalScrollPosition = 0;


          not sure if you are using  Flex 4.5 or not or if you have scrollers.  Can't remember of hand how to access the scroller in mx:TabNavigator, but the concept of setting scroll position should be possible.


          I put my own scroller inside each NavigatorContent then use the line above to set the scroller to top.

          <mx:TabNavigator   id="tn" width="100%" height="100%" creationPolicy="all">

            <s:NavigatorContent  id="formTab" label="Form">

                              <s:Scroller id="formScroll"   width="100%" height="100%" >

                              <s:Group  width="100%" height="100%>




          • 2. Re: TabNavigator  is keeping the previous state
            elMou77 Level 1

            Thank you Don for your effort. I really appreciate your help. Unfortunately, it did not help me. I have a tab navogation. Content is consisted from a component called Filters. This component is reside inside hbox. There are no scrolls asigned.


            Thank you