Hide and Show Tab in TabNavigator in Flex

Hide and Show Tab in TabNavigator in Flex

I have the following TabNavigator setup:

It will not work if you simply set the “visible” attribute to hide a certain tab like this:
    this.tab3.visible = false;
The correct way to do this is:
    tabNavigator.getTabAt(2).visible = false;

    // This will remove the tab completely from the layout - not taking spaces
    tabNavigator.getTabAt(2).includeInLayout = false;
Not sure the exact reason, but it works for me.


Leave a Reply

Your email address will not be published. Required fields are marked *

My new Snowflake Blog is now live. I will not be updating this blog anymore but will continue with new contents in the Snowflake world!