Hi,

You did not say whether you tried and it worked :-)

Run thecode below. Look out for the following.
  • Corner-radius is the radius applied to the Navigator and NOT the tabs (desired) when applied using styleName
  • Comment and UnComment the Tab style to see the difference. All the tabs have a corner-radius of 0.
Now back to the question, if I want to assign corner-radius to only ONE tabNavigator, how do I do it!

======================  CODE TO EXPERIMENT ===============================
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" width="100%" height="100%">
<mx:Style>
MyTabNavigator {
   tab-height: 30;
   tab-width: 87;
   border-color: #cccccc;
   background-color:#FF0000;
   corner-radius:16;
   }

MyTab {
   corner-radius: 8;
   fill-colors: #003366, #f6eeee;
   selected-fill-colors: #0033cc, #ffffff;
   border-color: #000000;
   color: #000000;
   background-color:#0033FF;
   }

/*  
Tab {
   corner-radius: 0;
   }  
*/

</mx:Style>

<mx:VBox width="100%" height="100%">
<mx:TabNavigator width="100%" height="50%" styleName="MyTabNavigator">
<mx:HBox label="Tab title 1"></mx:HBox>
<mx:HBox label="Tab title 2"></mx:HBox>
</mx:TabNavigator>
<mx:TabNavigator width="100%" height="50%" styleName="MyTab">
<mx:HBox label="Tab title 1" ></mx:HBox>
<mx:HBox label="Tab title 2"></mx:HBox>
</mx:TabNavigator>
</mx:VBox>
</mx:Application>

============================= END  OF CODE ======================================

bhaq1972 wrote:
Hi Sreejith,

> Infact the question is very simple.
>
> How do you set corner-radius = 10 to one TabNavigator and corner-
radius
> = 0 on another in the same application!
> I've given up! :-(
>

have you tried Matt's recommendation i.e. use the styleName property?

eg
(btw i added your stylesheet entries (MyTabNavigator and MyTab) into
main.css)

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">

  <mx:Style source="main.css"/>

  <mx:VBox>
        <mx:TabNavigator width="100%" height="50%"
styleName="MyTabNavigator">
                  <mx:HBox label="Tab title 1">
                        <mx:TextInput text="Text1"/>
                  </mx:HBox>
                  <mx:HBox label="Tab title 2">
                        <mx:TextInput text="Text2"/>
                  </mx:HBox>
            </mx:TabNavigator>

            <mx:TabNavigator width="100%" height="50%"
styleName="MyTab">
                  <mx:HBox label="Tab title 1" >
                        <mx:TextInput text="Text1"/>
                  </mx:HBox>
                  <mx:HBox label="Tab title 2">
                        <mx:TextInput text="Text2"/>
                  </mx:HBox>
            </mx:TabNavigator>
      </mx:VBox>

</mx:Application>

regards
bod







--
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




Reply via email to