i have a sequence of buttons and each button has its own icon.
I was wondering if I have to create a Spark skin file for each button in order to assign its icon.
thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You don’t have to create separate skins, you could make 1 skin and 1 class (that extends
Button) with a property you can set to determine which icon to draw based on the button.You can extend the button class like this
At this point you’d have a set of
IconButtons and you’d need to set theiconImgproperty for each.Declare the icon
And the set the
iconImgpropertyThen in your skin you use the property like this