When a Flex app starts up, the
StyleManager already has a set of selectors, such as for ApplicationControlBar
and ComboBox. They have default settings for all the styles that the components
expect to be set. If a style is unset, you can get RTEs or other misbehavior. In general, you should be fetching these pre-existing
selectors with StyleManager.getStyleDeclaration() and modifying them with
setStyle(). If instead you create a brand new CSSStyleDeclaration, you would
have to set all the expected styles, and I'm not sure we do a good job of
documenting what those are. So to solve your second problem, try changing var
comboBoxDeclaration:CSSStyleDeclaration = new CSSStyleDeclaration(); to var
comboBoxDeclaration:CSSStyleDeclaration = StyleManager.getStyleDeclaration("ComboBox"); The first problem is probably similar, but
I can't be sure because you don't show where applicationControlBarDeclaration
came from. - Gordon From: Hey all. I'm having problems with setting styles
progrmatically. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
__,_._,___ |