im4LF
im4LF

Reputation: 325

Flex4 TabBar skinning

I have trying to skin TabBar and NavigatorContent.

Please see image for explanation - All tabs are transparent (alpha 0.6) and also their borders.

How can I remove top border from NavigatorContent under selected buttonTab ?

Upvotes: 1

Views: 2966

Answers (2)

im4LF
im4LF

Reputation: 325

How its must be:

How its must be

Trying to use BlendMode.ERASE:

Application code:

...  
<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>

Perhaps there is an easier way?

Upvotes: 2

Eugene
Eugene

Reputation: 2216

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

also you can write your own skin

or extend the component itself

Upvotes: 0

Related Questions