Flex4 TabBar皮肤

时间:2010-09-09 09:15:28

标签: flex flex4 tabbar skinning

我试图为TabBar和NavigatorContent设置外观。

Please see image for explanation - 所有标签都是透明的(alpha 0.6)及其边框。

如何从所选buttonTab下的NavigatorContent中删除顶部边框?

2 个答案:

答案 0 :(得分:2)

必须如何:

How its must be

尝试使用BlendMode.ERASE:

申请代码:

...  
<s:SkinnableContainer blendMode="layer" ... skinClass="skins.TabBorder">
    <mx:ViewStack ...>
        <s:NavigatorContent label="Search" skinClass="skins.TabSkin" /> 
        <s:NavigatorContent label="Customer Info" skinClass="skins.TabSkin" /> 
    </mx:ViewStack>
    <s:TabBar dataProvider="{myViewStack}"  ... />
</s:SkinnableContainer>
...

skins.TabBorder:

<s:Rect left="0" right="0" top="25" bottom="0" radiusX="6" topLeftRadiusX="0">
    <s:stroke>
        <s:SolidColorStroke color="#ffffff" alpha="0.3" />
    </s:stroke>
</s:Rect>

skins.TabBarButtunSkin:

<!-- its black rect which clears all under -->
<s:Rect blendMode="erase" top="0" left="0" right="0" bottom="-2" topLeftRadiusX="6" topRightRadiusX="6" includeIn="selectedStates, overStates">
    <s:fill>
        <s:SolidColor color="#000000" />
    </s:fill>
</s:Rect>

也许有一种更简单的方法?

答案 1 :(得分:0)

<... borderSides=”left bottom right” borderStyle=”solid” borderThickness=”1″ ...>

你也可以写自己的皮肤

或扩展组件本身