Hi Byte..
Hope this helps


  private function
tabNavigatorCreatonCompleteHandler(event:FlexEvent):void{
     // setup TabNavigator
      var target:TabNavigator = TabNavigator(event.target);

      for(var i:int = 1; i < target.numChildren; i++){
       //target.getTabAt(i).enabled=false;
       target.getTabAt(i).visible= false;
      }
    }

   ]]>
  </mx:Script>


  <mx:TabNavigator
creationComplete="tabNavigatorCreatonCompleteHandler(event)"
width="100%" height="100%" >
<!-- your comps here -->
<mx:TabNavigator />

Cato Paus
http://www.umbrellacorp.no





--- In flexcoders@yahoogroups.com, "byte.sensei" <[EMAIL PROTECTED]>
wrote:
>
> I have a tabNavigator with 3 mx:Canvas tabs, each containing a
dataGrid
> for a different user/customer. Above the tabNavigator you can select
> up to 3 different users/customers, and this populates the associated
> grid in the tabNavigator. Pretty straightforward -- *except* that I
> don't want the tabs in the tabNavigator to be visible until you've
> selected a user/customer above.
>
> I tried setting the visible property of my mx:Canvas containers, but
> the tab still shows up regardless of whether the child is visible or
> not.
>
> Is there a way to prevent tabs in the tabNavigator from showing up? I
> could always dynamically add/remove the child mx:Canvas objects via
> actionscript, but in this case it's always 0-3 and I'd rather just
> create 3 mx:Canvas objects in MXML and then show/hide them as needed.
>
> I'm just baffled that visible="false" on the mx:Canvas child objects
> doesn't take away the tab in the tabNavigator! Is this by design?
>



Reply via email to