views:

17

answers:

1

I have 4 buttons, all of them have the same width.

<s:Button id="btn1" width="{btnWidth}" />
<s:Button id="btn2" width="{btnWidth}" />
<s:Button id="btn3" width="{btnWidth}" />
<s:Button id="btn4" width="{btnWidth}" />

Is it possible to set their width with Style, something like this:

s|Button{
   width: btnWidth;
}

I tried it, but auto-complete isn't working, which leads me to think that there's something wrong with the syntax. Basically my goal is to not have the width property set specifically for all 4.

+1  A: 

It won't work out of the box because width is a property of button, not a style. You can only specify styles in your stylesheet.

However, what you can do is extending Button and add a style that controls the width of your button.

PeZ