Copy link to clipboard
Copied
I'm having trouble finding the right properties for removing a gradient for a spark TabBar.
Is there a way to do that with css or will I need to create a custom skin to do the job?
Thanks.
For a full example, see http://blog.flexexamples.com/2010/05/04/setting-a-solid-tab-fill-on-a-spark-tabbar-control-in-flex-4/
Peter
Copy link to clipboard
Copied
hi,
I think the customised skin is the way to go, then again anything that lets me escape css is the better alternative
David.
Copy link to clipboard
Copied
Thanks. I does look like skins will give you much greater control over the look of the application.
I suppose I could use the <s:LinearGradient> tag with the same two colors within the <s:GradientEntry> tag. Surely there's a property to just set the component to a solid color.
-David
Copy link to clipboard
Copied
hi,
you can get quite fancy with skins for instance you can have some code that would add either gradient fills or solid fills depending on a variable set in the application(the lazy way when you don't want to extend the component).
Its way past sleep time at the moment so I will slap something together in the morning to give you an idea of the 'quikfix' methodology
David
Copy link to clipboard
Copied
Still looking for a solution.
I've tried just using SolidColor in various skin classes and nothing seems to be working.
Any ideas?
Copy link to clipboard
Copied
I created a custom Spark TabBar skin, and set a custom TabBarButton skin with the following fill:
<!--- layer 2: fill -->
<s:Rect id="fill" left="1" right="1" top="1" bottom="1" topLeftRadiusX="4" topRightRadiusX="4" width="69" height="21">
<s:fill>
<s:SolidColor color="0xFF0000"
color.selectedUpStates="0xBBBDBD"
color.overStates="0xBBBDBD"
color.downStates="0xAAAAAA"
alpha="0.85"
alpha.overAndSelected="1" />
</s:fill>
</s:Rect>
Peter
Copy link to clipboard
Copied
For a full example, see http://blog.flexexamples.com/2010/05/04/setting-a-solid-tab-fill-on-a-spark-tabbar-control-in-flex-4...
Peter
Copy link to clipboard
Copied
Ah ha! The button skin. I forgot about that.
Thank you very much!