1 Reply Latest reply on Mar 18, 2012 12:40 AM by John Hall

    Changing the style of TabNavigator

    Himanshu83

      I am new to the flex framework. I have to change style of tabs (change of color) on clicking of a button.

       

      I have experience of javascript but I am not able figure out it in Flex.

       

      Please help.

        • 1. Re: Changing the style of TabNavigator
          John Hall Level 4

          Tab Navigator is a tricky one but you'll want to do it in a style sheet, I think. Although I'm not sure if this is best practice, here's one tabNavigator CSS combo that I use on an app:

           

          mx|TabNavigator

          {

                    tab-offset: 0;

                    tab-width: 101;

                    border-color: #000000;

                    drop-shadow-visible: true;

                    first-tab-style-name: tab;

                    last-tab-style-name: tab;

                    tab-style-name: tab;

                    selected-tab-text-style-name: selectedText;

          }

           

           

          mx|TabNavigator .tab

          {

                    font-size: 14;

                    up-skin: Embed(source="assets/images/generic/normalTab.png");

                    over-skin: Embed(source="assets/images/generic/back.png");

                    selected-up-skin: Embed(source="assets/images/generic/insetTab1.png");

                    selected-down-skin: Embed(source="assets/images/generic/insetTab1.png");

                    selected-disabled-skin: Embed(source="assets/images/generic/insetTab1.png");

                    selected-over-skin: Embed(source="assets/images/generic/insetTab1.png");

          }