When using text in Flex, I commonly create TextAreas, assign marked up text
(htmlText property) to those areas and then apply a StyleSheet.

I couple of limitations that are frustrating.  TextArea doesn't seem to
resize automatically.  This means if I have a couple of TextAreas in the
flow of a Box, they may not be large enough for the text.  If I assign new
text they do not resize appropriately.  I don't find flash's textheight
calculations reliable.

The flow of text and media.
I do believe that htmlText can contain an img tag, making it part of the
flow.  But the range of styles is limited.

In general, is there a good way, a best practice, to use marked up text and
other uicomponents in a flow?  Can text wrap a Ui component that is a
videoplayer?

Also, can  I can use an external CSS to style a TextArea with marked up
text?

I know that i can set styleName to one style definition.  But the point is
to apply any number of styles to any number of tags.

__textArea.styleSheet = someExternalCss; -- ideally a CSS that is applied to
whole app without explicitly loading.

Any thoughts or pointers to resources are appreciated.

What I'm doing:

private var __info:TextArea;
private var styles:StyleSheet;
private var stylesText:String =
            '.h1{ font-family:  Arial, Helvetica, Times; font-weight:
regular; color:#ffffff; font-size:20; }'+
            '.regular{ font-family: Arial, Helvetica, Times; font-weight:
regular; color:#ffffff; font-size:14; }'+
            '.link{ font-family: Arial, Helvetica, Times; font-weight:
regular; color:#68b8d6; font-size:14; text-decoration:underline; }';

styles = new StyleSheet();
styles.parseCSS(stylesText);

__info = new TextArea();
__info.styleSheet = styles;


-- 
Johnny Waggener
Software Developer
Multicast Media
678-592-2650

Reply via email to