I'm starting to get frustrated with CSS in Flex... It seems
like external stylesheets are a waste of time, since you can't set
a lot of styles with them. Instead I am forced to set the styles in
ActionScript, like this:
var dataGridStyle:CSSStyleDeclaration =
Is there some easier/better way to do this? I would really
like to be able to change styles on the fly - or at least not
having to compile a file with updated ActionScript code to change
the background color of a component.
You shouldn't have to set your styles in actionscript like
that. Changing them in your stylesheet should work just as well.
However...that being said, you DO still have to re-compile your app
after a change to your stylesheet. If all you're trying to do is
test out different colors, and try out different styles, you might
try something like FlexSpy:
FlexSpy will let you change styles on the fly without
touching any css or actionscript.