开发者

Styling individual buttons in ButtonBar in Flex

开发者 https://www.devze.com 2023-04-02 08:13 出处:网络
Is there any way that we can style individual buttons in Button开发者_开发百科Bar in FlexThis may be a little late but here goes an answer that may help others.

Is there any way that we can style individual buttons in Button开发者_开发百科Bar in Flex


This may be a little late but here goes an answer that may help others.

In a button bar you can use 3 styles: style for the first button (property: firstButtonStyleName), the last button (property: lastButtonStyleName) and the other buttons (property: buttonStyleName).

For each property, you would simple have to create a corresponding style as if you were styling a single button.

It would give you sth like this...

<mx:ButtonBar buttonStyleName="topButtonBarButtonStyle"/>

style.css:

.topButtonBarButtonStyle{
    fill-colors: #ffffff, #b8b9b9, #b8b9b9, #ffffff;
    border-color: #E6E6E6;
    theme-color: #E6E6E6;
}

With this, I get for each button the following style: borders in #e6e6e6 color, a gradient from #ffffff to #b8b8b9 when the button is in normal state, a reverted gradient when the user rolls over the button.

And this does the trick :)


give them each a class(styleName), and put the styling info in a stylesheet.

0

精彩评论

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