开发者

textarea shows 2 lines when htmlText is set

开发者 https://www.devze.com 2023-01-19 04:31 出处:网络
I am using a TextArea. I set its htmlText as follows: textArea.htmlText = \'<P ALIGN=\"CENTER\"><FONT FACE=\"_sans\" SIZE=\"14\" COLOR=\"#FFFF0开发者_如何学JAVA0\" LETTERSPACING=\"0\" KERNI

I am using a TextArea. I set its htmlText as follows:

textArea.htmlText = '<P ALIGN="CENTER"><FONT FACE="_sans" SIZE="14" COLOR="#FFFF0开发者_如何学JAVA0" LETTERSPACING="0" KERNING="0"></FONT></P>';

The problem is that there are always 2 lines in text area when it runs. When I remove this i get usual one line but then i m not able to set color and all.

I want to use textarea, set different colors on it and I don't want 2 lines in that.


Also the condenseWhite option...

http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/text/TextField.html#condenseWhite


hi probably this is the flash bug. i think <p></p> tag creates new line itself so i just removed <p></p> tags from htmlText and it solved my problem

Actually if i remove <p></p> then there is a format problem so the best solution is to remove '>' from <p>something</p> so new line will not be there.

Regards

0

精彩评论

暂无评论...
验证码 换一张
取 消