I am working with the Flexbuilder 3 app. I created some CSS
styles to apply to buttons in my app. The CSS style selector is
button. However, when I compile my MXML file, the style is also
being applied to any scrollbars on the page. Is this a bug or is
there some other selector I should use?
After compiling he CSS into a SWF file, I include the CSS
with the command:
initialize = "StyleManager.loadStyleDeclarations(
This results in all buttons on the page being styled red
fading into black -- which is what I want. However, if any element
expands and requires a scrollbar, the entire scrollbar picks up the
button class style. This produces a scrollbar the is bright red at
the top and fades into black on the bottom. That looks good on the
buttons, but looks dreadful on the scrollbar.
Why is this happening? What selector do I use to target only
the button controls?
The buttons on a ScrollBar are indeed derived from the Button
class, so, they inherit everything that you assign to Button. I
think it is the fillColors causing the problem. You can add another
class selector like:
fillColors: #FFFFFF, #E7E7E7;
The ScrollBars will go back to looking more normal. You might
have to play around a bit more with the styles if I am missing