Something
that I am finding a real pain in my Flex 2 projects is trying to apply
StyleSheets to my text. I have found some information on fixing the problems
with the TextArea component and I am in the process of applying these to the
Text component as well. I
think my biggest gripe right now is that I want to combine all my styles into
one css file so I don’t have component styles in one location and html
text styles in another. Also I don’t really want to load my html text
styles at runtime yet I really want to keep them in their own style sheet and
not embedded in something like a String tag in an MXML file. So
my idea was to put all my html text styles in the css style sheet that styles
the components. Then at runtime loop through the CSSStyleDeclarations in the
StyleManager and build a new flex.text.StyleSheet to apply to my components
that use html text. Problem is that it looks like the StyleManager is storing
all this info in a static private variable called ‘selectors’ so
there doesn’t seem to be any way to loop this info without branching this
class in order to make that variable public. Since
I really don’t want to start branching any of the mx components for any
reason I am hoping that someone on this list has an idea that I haven’t thought
of yet? Adobe
really needs to address this in a future version of Flex as right now having
multiple text styles on one block of text is excruciatingly painful to make
work yet it is such a basic feature of the Flash player for so long now. Thanks! Lance -- 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
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ |
- Re: [flexcoders] Re: Flex Documentation Team - Showing Relate... greg h
- [flexcoders] Making StyleSheets and StyleManger work tog... Lance Linder