前端 · 2013 年 5 月 22 日

Flex4-Accordion组件中NavigatorContent的选项卡样式

<mx:Accordion width=”140″ height=”300″  selectedIndex=”1″ headerStyleName=”accordionStyle”>
<s:NavigatorContent width=”100%” height=”100%” label=”主线” skinClass=”ui.skin.taskNav”>
<s:Label text=”任务1″/>
<s:Label text=”任务2″/>
<s:Label text=”任务3″/>
<s:Label text=”任务4″/>
</s:NavigatorContent>
<s:NavigatorContent width=”100%” height=”100%” label=”支线” skinClass=”ui.skin.taskNav”>
<s:Label text=”任务5″/>
<s:Label text=”任务6″/>
<s:Label text=”任务7″/>
<s:Label text=”任务8″/>
</s:NavigatorContent>
<s:NavigatorContent width=”100%” height=”100%” label=”精英” skinClass=”ui.skin.taskNav”>
<s:Label text=”任务9″/>
<s:Label text=”任务10″/>
<s:Label text=”任务11″/>
<s:Label text=”任务12″/>
</s:NavigatorContent>
</mx:Accordion>

通过使用这个属性:headerStyleName给NavigatorContent的选项卡设置样式。

<fx:Style>
.accordionStyle
{
font-size:12px;/*设置字体大小*/
text-align:center;/*设置字体对齐方式*/
}
</fx:Style>