1 Reply Latest reply on Sep 29, 2010 9:22 PM by Budkin76

    Resizing TabBar Tabs Dynamically

    Budkin76 Level 1

      Hello Flexxers,


      What I want to do is have tabs that display both icons and labels in them. I've got that working.


      Next, I want the selected tab to show the icon and the label (the default) and the unselected tabs to only show the icon, and be set to to a specific width that will only hold the icon. I can't for the life of me figure this out. I'm able to set the width of the ButtonBarButtons in the skin, but that resizes all of the tabs. I can't seem to change each one separately or dynamically. Can I access properties in the skin files when I select a tab? Maybe dynamically swap the skins of the ButtonBarButtons? Any ideas how I can go about doing this? Thanks!


      P.S. My TabBar has a custom skin which has an itemRenderer displaying a ButtonBarButton in it. This ButtonBarButton has its own custom skin where the icon image and the label are drawn.

        • 1. Re: Resizing TabBar Tabs Dynamically
          Budkin76 Level 1

          Just came up with a solution for this which I had overlooked:


          In the TabBarButtonSkin (which is on the ButtonBarButton inside the TabBarSkin), you just use the built in states to set the width of the skin on the mouse interactions.




          width.over = "xx"

          width.up = "xx"



          It does just what I was looking for.