0

I tried using css style to set padding for the panel, but it doesn't work

<fx:Style>
.logo-bar{
    paddingRight: 20px;
}
</fx:Style>
<s:Panel styleName="logo-bar">
    <s:Label>Hello</s:Label>
</s:Panel>

But the same style will work on flex 3 panel, What should I do to set padding for flex 4 panel?

Kirk Broadhurst
  • 27,836
  • 16
  • 104
  • 169
Mark Ma
  • 1,342
  • 3
  • 19
  • 35
  • Try right instead of paddingRight: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core/UIComponent.html#style:right Also review the panel styles: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/Panel.html#commonstyleSummary – JeffryHouser Nov 10 '13 at 12:01

1 Answers1

0

For spark, padding is set on the layout object.

<s:Panel>
        <s:layout>
            <s:VerticalLayout paddingRight="20"/>
        </s:layout>
</s:Panel>
flexicious.com
  • 1,601
  • 1
  • 13
  • 21