I made a custom component, BitmapButton, which is based on spark.components.Button. It basically just takes three Bitmap objects - upBitmap, overBitmap and downBitmap - and then its skin class, BitmapButtonSkin, uses these bitmaps for each state.
Now the problem: I want to make a ButtonBar which uses my BitmapButton for its buttons. What do you think would be the right way to approach this? Do I need to create a new component such as ToggleBitmapButton and the开发者_如何学编程n its skin or can I reuse the classes I've already made?
You need only create a custom skin for the ButtonBar and inside it use custom skins for the buttons. From what you have described as your goal, I see no need to create custom components, neither for the ButtonBar, nor for the buttons themselves.
精彩评论