I solved this using a stylesheet, a TabBar and a Viewstack.
I'm new to Flex so there may be a better way but this works for me.
- Christy

Here's an example:

<mx:Script>
function setTabStyles2()
                {
        //this can be inside a loop to avoid hardcoding of indices.
        tb1.getChildAt(0).styleName = "tabA";         
        tb1.getChildAt(1).styleName = "tabB";
        tb1.getChildAt(2).styleName = "tabC";
        tb1.getChildAt(3).styleName = "tabD";
        tb1.getChildAt(4).styleName = "tabE";
                }
</mx:Script>

<mx:TabBar id="tb1" creationComplete="setTabStyles2()"></mx:TabBar>

<mx:ViewStack>
  <tab:tabWelcome label="Welcome" id="tabA" styleName="tabA"/>
  <tab:tabForms label="Forms" id="tabB" styleName="tabB"/>
  <tab:tabGallery label="Gallery" id="tabC" styleName="tabC"/>
  <tab:tabCalendar label="Calendar" id="tabD" styleName="tabD"/>
  <tab:tabFAQ label="FAQ" id="tabE" styleName="tabE"/>
</mx:ViewStack>

--- In [email protected], Jose Quiles <[EMAIL PROTECTED]> wrote:
>
> Hi,
>  I tried this too, but it seems that all the Tabs in every 
TabNavigator on
> the application share the same style properties.
>  It's a headache....
>  Regards,
> Jose
> 
>  2005/10/19, Sreejith Unnikrishnan <[EMAIL PROTECTED]>:
> >
> > Maybe you should consider creating a custom style for each of the
> > TabNavigator.
> >
> > .firstTab {
> > fill-colors: #EE00FF,#FFFFFF;
> > }
> >
> > .secondTab {
> > fill-colors: #EE00FF,#FFFFFF;
> > }
> >
> > and then apply them to the TabNavigator.
> >
> > Sree
> >
> > Jose Quiles wrote:
> >
> > > Hi again,
> > >
> > > I tried your sample, and the tabs of two TabNavigator have the 
same
> > > colors, it seems that the fillColors attribute is ignored.
> > >
> > > This is the code I tried:
> > >
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml";
> > > width="100%" height="100%">
> > >
> > >
> > > <mx:TabNavigator id="first" width="50%" height="30%"
> > > fillColors="[0xEE00FF,0xFFFFFF]">
> > > <mx:HBox width="50%" height="30%" label="one"/>
> > > <mx:HBox width="50%" height="30%" label="two"/>
> > > <mx:HBox width="50%" height="30%" label="three"/>
> > > </mx:TabNavigator>
> > >
> > >
> > > <mx:TabNavigator id="second" width="50%" height="30%"
> > > fillColors="[0xFFEE00,0xFFFFFF]">
> > > <mx:HBox width="50%" height="30%" label="one"/>
> > > <mx:HBox width="50%" height="30%" label="two"/>
> > > <mx:HBox width="50%" height="30%" label="three"/>
> > > </mx:TabNavigator>
> > > </mx:Application>
> > >
> > > Any ideas?
> > >
> > > Thanks,
> > > Jose
> > >
> > >
> > >
> > > 2005/10/18, Deepa Subramaniam <[EMAIL PROTECTED]>:
> > > > The fillColors style can be set on the TabNavigator itself 
and will
> > > > affect the tabs for that TabNavigator.
> > > >
> > > > So, you can set the fillColors style in the mxml tag for each
> > > > TabNavigator in your application. Something like:
> > > >
> > > > <mx:TabNavigator id="first" 
fillColors="[0xEEFF00,0xFFFFFF]" />
> > > >
> > > >
> > > > <mx:TabNavigator id="second" 
fillColors="[0xFFEE00,0xFFFFFF]" />
> > > >
> > > > -deepa
> > > > -----Original Message-----
> > > > From: [email protected] 
[mailto:[EMAIL PROTECTED]
> > On
> > > > Behalf Of Jose Quiles
> > > > Sent: Tuesday, October 18, 2005 10:17 AM
> > > > To: [email protected]
> > > > Subject: [flexcoders] TabNavigator styles
> > > >
> > > > Hi,
> > > >
> > > > I have two TabNavigator on the same application, and I need 
to use
> > > > different fill colors for the Tabs on each of them.
> > > >
> > > > Anyone knows how to do it?
> > > >
> > > > Thanks a lot!
> > > > Jose
> > > >
> > > >
> > > >
> > > > --
> > > > Flexcoders Mailing List
> > > > FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > > > Search Archives:
> > > > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > > > Yahoo! Groups Links
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Flexcoders Mailing List
> > > > FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > > > Search Archives:
> > > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > > > Yahoo! Groups Links
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Flexcoders Mailing List
> > > FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > >
> > >
> > > ---------------------------------------------------------------
---------
> > > YAHOO! GROUPS LINKS
> > >
> > > * Visit your group "flexcoders
> > > <http://groups.yahoo.com/group/flexcoders>" on the web.
> > >
> > > * To unsubscribe from this group, send an email to:
> > > [EMAIL PROTECTED]
> > > <mailto:[EMAIL PROTECTED]
subject=Unsubscribe>
> > >
> > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > > Service <http://docs.yahoo.com/info/terms/>.
> > >
> > >
> > > ---------------------------------------------------------------
---------
> > >
> >
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives: http://www.mail-archive.com/flexcoders%
40yahoogroups.com
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
> >
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 




Reply via email to