1 Reply Latest reply on Dec 31, 2010 12:37 PM by Gregory Lafrance

    Is this a bug?

    RichieWhite Level 1

      The following code should make the first tab hidden, but it doesn't.


      <?xml version="1.0" encoding="utf-8"?>

      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"


         xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">


      <!-- Place non-visual elements (e.g., services, value objects) here -->


      <mx:TabNavigator x="36" y="82" width="200" height="200">

      <s:NavigatorContent visible="false" label="Tab 1" width="100%" height="100%">


      <s:NavigatorContent label="Tab 2" width="100%" height="100%">





      Am I doing something wrong or is this a bug? Does anyone know a workaround? I need to be able to programmatically show/hide tabs.

        • 1. Re: Is this a bug?
          Gregory Lafrance Level 6

          I believe setting a TabNavigator view visible="false" just makes the tab appear to be empty.


          You will probably have to programmatically call addChildAt(), removeChildAt() on the TabNavigator to remove and add children at the proper index.


          In this scenario, your code will be cleaner if the views are mxml components, initialized in ActionScript in the fx:Script tag.


          If this post answers your question or helps, please mark it as such. Thanks!

          Adobe Flex Development and Support Services