开发者

Using custom button for ButtonBar's middleButton skin part

开发者 https://www.devze.com 2023-03-30 05:36 出处:网络
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, Bitmap

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消