var ar:Object = tabNav.rawChildren.getChildAt(2);

Like this you can get the reference to the TabBar of the Tab Navigator and
then on the Tab bar you can add a listener to itemClick.



On Wed, Mar 17, 2010 at 12:18 AM, joe <[email protected]> wrote:

> I was using the below code.
>
>    private var tabIndx:Number = 0;
>     private function Changetab():void {
>        if (tab.selectedIndex != tabIndx )
>           Alert.show("Do you want to change the TAB?", "" ,3,this,
> alertClickHandler);
>         }
>        private function alertClickHandler(event:CloseEvent):void {
>                if (event.detail==Alert.YES)
>                         tabIndx = tab.selectedIndex;
>                else
>                         tab.selectedIndex = tabIndx;
>
>        }
>
> But the problem is, the alert will be displayed only after showing the
> second tab. So  if I press cancel, the first tab will be displayed,
> but the data will be refreshed. My requiremtn is to retain the data in
> the first tab.
> Can we give Stopimmediatepropagation for this? But by using that, we
> are not getting the next tab's selectedindex.
>
> Thanks in advance
>
> On Mar 16, 5:53 pm, Akshar Kaul <[email protected]> wrote:
> > you can use the change event of the tab navigator.
> >
> > Akshar Kaul
> >
> >
> >
> > On Tue, Mar 16, 2010 at 17:44, joe <[email protected]> wrote:
> > > Hi All
> >
> > > I want to create an onclick event on switching between the tabs in the
> > > tabnavigator.
> >
> > > I want to show a confirmation msg when the user clicks on a tab, if he
> > > selects yes then he should be allowed to move to the selected tab
> > > otherwise remain on the same tab he is viewing with out refreshing the
> > > data in it.
> >
> > > Thanks in advance
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Flex India Community" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<flex_india%[email protected]>
> <flex_india%2bunsubscr...@googlegrou­ps.com>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/flex_india?hl=en.- Hide quoted text -
> >
> > - Show quoted text -
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
>


-- 
Thanks,
Vaibhav Seth.

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to