Changing css properties for selector at runtime
I have a css that defines de skin-class for a custom component, like this :
view|PlaceHolderView {
skin-class:ClassReference('view.skin.PlaceHolderSkin');
}
Is there a way to change that value at run开发者_Python百科time, so that all instances of the component switch skin?
I found the answer to my question after a bit more digging around.
var dec:CSSStyleDeclaration = styleManager.getStyleDeclaration('view.PlaceHolderView')
dec.setStyle('skinClass', MyOtherSkinClass);
styleManager.setStyleDeclaration('view.PlaceHolderView', dec, true);
精彩评论