Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Yea, it's really nasty to not be documented such a trivial task. I come upon this post but i'm on Flex builder 4.6 and targeting mobile application (flex mobile). There is Spark TabbedViewNavigatorApplication which has TabbedViewNavigator as its child. The adobe forums and help show only how to hide the entire tabBar, which is really obvious, but not how to hide distinct options inside the tabBar.</p> <p>Some places i visited suggested to remove items from the TabbedViewNavigator when you want to hide them, and then put them back again with removeItemAt, addItemAt combination ... but you really don't want to do that.</p> <p>The first reason is that with removing items from tabBar you are removing ViewNavigators which form the View stack of certain section. </p> <p>With removing one of the navigators, you are messing with this stack, and if your application tends to be on the complex side, or tends to grow that way, you will find yourself in trouble writing code that manages all those removal and adding processes, keeping in mind that your indexes in the navigators Vector in TabbedViewNavigator don't get messed. </p> <p>Furthermore, if you do some caching, or custom handle navigator properties, restoring them to the state where they been in the moment you removed them from the tab stack will give you a lot of headache.</p> <p>Following the solution from the original post, and with little experimenting the solution is quite simple:</p> <pre><code> // let say that the instance of Tabbed view navigator look like this: // appRef is reference to TabbedViewNavigatorApplication (if you are in the main mxml, just put "this" as reference) .... var myTabbedViewNavigator : TabbedViewNavigator = appRef.tabbedNavigator; var index : int = 0; // we take item at index 0 for example (1st option in tabBar) var dg : DataGroup = myTabbedViewNavigator.tabBar.dataGroup; dg.getElementAt(index).visible = false; dg.getElementAt(index).includeInLayout = false; .... </code></pre> <p>To show the tab again put true, and that's it, your navigators will still be there inside your TabbedViewNavigator but their visual representation in the tabBar will be invisible. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload