Should be possible to remove child using something like the following. In fact I believe this should work with regular TabNavigator as well.

tabNav.removeChildAt(index);
tabNav.invalidateDisplayList();

hth
Scott

Scott Melby
Founder, Fast Lane Software LLC
http://www.fastlanesw.com



nasawebguy wrote:

Thanks Scott. I look it over some...very nice. But, I don't readily
see an option to programmatically close a specific tab.

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>, Scott Melby <[EMAIL PROTECTED]> wrote:
>
> You may be better off using the SuperTabBar
>
<http://flexlib.googlecode.com/svn/trunk/docs/flexlib/controls/SuperTabBar.html <http://flexlib.googlecode.com/svn/trunk/docs/flexlib/controls/SuperTabBar.html>>

> component from flexlib.
>
> hth
> Scott
>
> Scott Melby
> Founder, Fast Lane Software LLC
> http://www.fastlanesw.com <http://www.fastlanesw.com>
>
>
>
> nasawebguy wrote:
> >
> > I want to show/hide tabs based on user permissions. Permissions work
> > fine on combo boxes, etc. But not tabs. What I do on the combos is
> > simply set myCB.visible = true, if they have permissions to see it.
> >
> > I tried things like setting the tab canvas to true/false. Didn't do
> > anything.
> > I tried myTabCanvas.visible = false/true. Didn't do anything.
> > I tried myTabNav.getChildAt(1).visible=false/true. Didn't do anything.
> > I tried myTabNav.removeChildAt(2), etc. Didn't do anything.
> >
> > I know the permissions-side works because I use it with other
> > component. I simple use an if/else to set visible= true/false.
> >
> > I have four tabs. MyTab, MyTeamTab,MySubRegionTab, MyRegionTab. If the
> > user is team admin, he sees the team tab, etc. If the user is not an
> > admin at all, they just see one MyTab.
> >
> > In general, I'm looking for what to fill in something like this..
> > if (adminTeam == true) {
> > show teamTab
> > }
> > else {
> > don't show teamTab
> > }
> >
> > Any suggestions?
> >
> > Also, does creationPolicy on the TabNavigator impact how this would
> > work? If it does, what should it be set to? creationPolicy has bitten
> > me before.:)
> >
> > Thanks,
> > Don
> >
> >
>

Reply via email to