Search code examples
apache-flexflex-sparkhalo

Set Spark button width in ButtonBar


How do I set the individual button sizes in a Spark ButtonBar? It used to be something like:

<mx:ButtonBar id="myButtonBar" buttonHeight="12" buttonWidth="250" >

I get an error when I try to do the same in Spark:

Cannot resolve attribute 'buttonHeight' for component type spark.components.ButtonBar

I don't want to create a separate skin...just something that will work inline if possible


Solution

  • Just set its layout.

    <s:ButtonBar id="myButtonBar">
        <s:layout>
            <s:HorizontalLayout variableColumnWidth="false" gap="0" columnWidth="250"/>
        </s:layout>
    </s:ButtonBar>
    

    Many things are just different in Spark :)