PDA

View Full Version : TextArea Component font color problem


jfsomers
07-07-2004, 04:02 AM
I've gone through numerous threads in these forums and I haven't seen anything that might resolved what I hope is a simple problem of mine.

I made a textArea w/ html=true and edit=false. No matter what I try, the font color of the text remains black unless I change html=false at which point my text can't have the identations/breaks that I want it to.

I tried using _globals

_global.style.setStyle("color", 0xFFFFFF);
_global.style.setStyle("themeColor", "haloBlue")
_global.style.setStyle("fontSize", 12);
_global.style.setStyle("fontFamily", "Verdana");
_global.style.setStyle("backgroundColor", undefined);

and they work fine for every other componet (radial, button, combobox, etc.) but it doesn't change the text in the textArea component.

I aslo tried using this:

TextArea.setStyle("borderStyle", "none");
_global.styles.TextArea.setStyle("backgroundColor", undefined);
TextArea.setStyle("color", 0xFFFFFF);

The border and background go transparent (which is what I want) but the text remain black.

In both cases the text was added using the TextArea.text = "<insert text>"; method.

What I'm I doing wrong?

Thanks in advance for the help

jfsomers
07-07-2004, 06:56 AM
Solved my own problem :)

For future reference to any peopl who have the same problem I have had:

http://www.actionscript.org/tutorials/beginner/XML-Formatted_Content/index.shtml

This tutorial will help create a CSS and XML formatted text for use in the TextArea panel. I don't know why I didn't go this route sooner since using a CSS solves the problem of using HTML (or XML) formatted text files while easily adding the appropriate colors.

I still wanted to remove the textarea component border and set the background transparent. My previously action script line myText.setStyle("borderColor", "none"); worked fine, but the script disabbling the background color no longer worked. If I removed the CSS and XML related code, it worked again. I believe there might bee some sort of conflict. Then again I'm still reelling from having to take Fortran in my first year of University and so code is not my forte.

At any rate, after trying numerous soltions posted in the forums I found this line of text worked the best:

_global.styles.TextArea.setStyle("backgroundColor", "false");