Hi Jason,

What I would do,

- Listen for the enabledChanged event on all views in the navigator.
- when you want to disable a view, use your selected index that you 'know'
to get the selected child container.
- once you have the container ref of the view, then set the enabled of this
view, the event handler you made for all views of the navigator will fire.
- in the event handler;

// the event.currentTarget should actually be the view that is being
enabled/disabled
var button:Button =
navigator.getTabAt(navigator.getChildIndex(DisplayObject(event.currentTarge)));
button.enabled = true|false;

You could also use bindings but I don't know how your app is set up.

PS you could do all of this in one step as well when you disable/enable the
view, just depends how decoupled you want these actions to be.

Peace,
Mike

On Mon, Sep 15, 2008 at 10:15 AM, Jason B <[EMAIL PROTECTED]> wrote:

>   I guess your either stating it can't be done what im asking or you
> maybe you didn't see what i wrote i already know what you wrote?
>
> Either way let me try and explain what im doing, I wont know the
> canvas name since and explaining why is beyond the scope of this
> question, so i know the tabnav's index number and would like to
> disable the tabnav based on that?
>
>
> --- In [email protected] <flexcoders%40yahoogroups.com>, "Willy
> Ci" <[EMAIL PROTECTED]> wrote:
> >
> > <mx:TabNavigator width="200" height="200">
> > <mx:Canvas label="Tab 1" width="100%" height="100%">
> > </mx:Canvas>
> > <mx:Canvas label="tab 2" width="100%" height="100%">
> > </mx:Canvas>
> > <mx:Canvas label="tab 3 disabled" width="100%" height="100%"
> > enabled="false">
> > </mx:Canvas>
> > </mx:TabNavigator>
> >
> >
> >
> > Willy
> > 617-606-3437
> > ----------------------------------------------------------
> > 6 X 9 = 42
> >
> > Q: How do you spell "google"?
> > A: Why don't you google it?
> > ----------------------------------------------------------
> >
> >
> >
> > On Mon, Sep 15, 2008 at 9:09 AM, Jason B <[EMAIL PROTECTED]> wrote:
> > > Is it possible to disable a tab inside a tab navigator?
> > >
> > > I know i can put it in a canvas or panel etc and do it that way but my
> > > question is it possible to disable tabs inside a tab nav, I would like
> > > to do this if possible.
> > >
> > >
> >
>
>  
>



-- 
Teoti Graphix, LLC
http://www.teotigraphix.com

Teoti Graphix Blog
http://www.blog.teotigraphix.com

You can find more by solving the problem then by 'asking the question'.

Reply via email to