0
votes

Im trying to create a custom skin for ButtonBarButton. I need to create vertical layout of icon and label placement like in this exapmle for mx ButtonBar component: http://blog.flexexamples.com/2008/01/08/changing-the-label-placement-for-a-flex-buttonbar-control/

Unfortunately there is no "labelPlacement" property in spark components and i cant find a way to change the default BasicLayout layout for custom SparkButtonSkin either.

Found a solution where you set icon position with function 'setStyle' (in spark skin initializer Handler)

protected function sparkbuttonskin_initializeHandler(event:FlexEvent):void
    {
        setStyle("iconPlacement", IconPlacement.TOP);
    }
1

1 Answers

0
votes

There is an iconPlacement property in Spark Button. But if you want to put Buttons inside of ButtonBar component you have to do something like this http://blog.flexexamples.com/2009/07/28/displaying-icons-in-a-spark-buttonbar-control-in-flex-4/