Skip navigation
Currently Being Moderated

Spark - ButtonBarButton - Specify unique skin for all middle buttons...

Apr 6, 2012 6:14 AM

Hi Flex Masters,

 

I am trying to figure out a way to apply a unique skinClass to all middle buttons within the ButtonBarButton component. I have a unique skin specified for the first, middle and last button, but have no idea idea how apply a uniqueSkin class for each of the middle buttons. I have a first button, 4 middle buttons and a last button.

 

<!-- 1 -->
        <fx:Component id="firstButton">                    
            <buttons:HatchedButton allowDeselection="false"                
                height="115%"
                width="115"    
                fontFamily="MyriadPro"
                fontWeight="bold"
                skinClass="HatchedButtonSkin"
            >                                        
            </buttons:HatchedButton>
        </fx:Component>
       

        <!-- 2 through 5 -->
        <fx:Component id="middleButton" >            
            <buttons:HatchedButton allowDeselection="false"
                height="115%"
                width="115"                
                fontFamily="MyriadPro"
                fontWeight="bold"        
                skinClass="HatchedButtonSkinMiddle"
            />            
        </fx:Component>

         <!-- 6 -->
        <fx:Component id="lastButton" >
            <buttons:HatchedButton allowDeselection="false"
                height="115%"
                width="115"                
                fontFamily="MyriadPro"
                fontWeight="bold"
                skinClass="HatchedButtonSkinLast" />                                            
        </fx:Component>       

 

For <!-- 2 through 5 --> is there a way to specify an array of skinClass(es) is order to apply unique skin for button 2 through 5, via a dataProvider or other technique?  Can anyone provide an example or link on how to accomplish this task that has me stuck?

 

Thanks so much for any help,

~Chipleh

 
Replies
  • Currently Being Moderated
    Apr 6, 2012 10:54 AM   in reply to Chipleh

    You might be able to create a single skin that instantiates a class from the arraycollection.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points