4 Replies Latest reply on May 28, 2011 2:39 PM by FTQuest

    Spark skin: How to skin last TabBar button differently than the other tabs

    jonas345

      Hi,

       

      I am using a Spark TabBar with custom skin. I implemented this by creating a custom tabar skin and then I apply the buttonbarbuttonskin in the item renderer like:

       

              <s:itemRenderer>   
                  <fx:Component>               
                      <s:ButtonBarButton skinClass="com.sca.skin.CustomButtonBarButton" />
                  </fx:Component>
              </s:itemRenderer>

       

      Now I would like to skin the last tab with a different skin. I have tried to apply the skin class to the item renderer and then in the MXML apply it like:

       

             <s:itemRenderer>   
                  <fx:Component>               
                      <s:ButtonBarButton skinClass="{data.skinClass}" />
                  </fx:Component>
              </s:itemRenderer>

       

      This does not work. Not sure I understand how the renderer are applying other properties like the label onto the button if it is? Is there a way to render the last button differently or access the renderer data property?

       

      Thanks,

      Jonas