You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by agm65 <ag...@gmx.de> on 2014/05/21 14:16:24 UTC

styleSheet and textarea Problem

Hello everybody,
i have a problem adding a stylesheet to my textarea to format the html text.

Thats my code

class:
public static var styles:String = "a { color: #33CCFF; } a:hover { color:
#3366CC; text-decoration: underline; }";
public static var myStyleSheet:StyleSheet = new StyleSheet();

renderer:
StyleableTextField(this.txtMessage.textDisplay).styleSheet =
Class.myStyleSheet;
StyleableTextField(this.txtMessage.textDisplay).htmlText = data.message;


Error:
Error: Error #2009: This method cannot be used on a text field with a style
sheet.


I also tried calllater no success, any ideas?



<s:TextArea id="txtMessage" width="100%" height="100%" editable="false" 
		borderVisible="false" skinClass="spark.skins.mobile.TextAreaSkin" />



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/styleSheet-and-textarea-Problem-tp6543.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: styleSheet and textarea Problem

Posted by agm65 <ag...@gmx.de>.
Hello again,

i think its the resetting in the renderer this prevents it.

if(StyleableTextField(this.txtMessage.textDisplay).styleSheet != null)					
StyleableTextField(this.txtMessage.textDisplay).styleSheet = myStyleSheet;


have a nice day!



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/styleSheet-and-textarea-Problem-tp6543p6544.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.