You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Tonic <an...@hotmail.fr> on 2014/08/27 22:27:41 UTC

Flex Mobile + Textarea + HTML Text not work

Hello,

I try to show HTML text in a Textarea component in a mobile component.

I just try a simple example (the final html text is longer and I want to use
scrolling with selectable=false) :



With this example, no text appears in the textarea. I don't understand why
:) ?

Thanks for your help :)



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flex-Mobile-Textarea-HTML-Text-not-work-tp7773.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Flex Mobile + Textarea + HTML Text not work

Posted by Tonic <an...@hotmail.fr>.
Ok thanks Alex.

I test all of skins (spark Textarea, mobile Textarea, default skin), the
only skin working good it's spark TextArea skin if you want to display html
text, and scrolling.







--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flex-Mobile-Application-Textarea-HTML-Text-not-work-tp7773p7810.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Flex Mobile + Textarea + HTML Text not work

Posted by Alex Harui <ah...@adobe.com>.
There are three different TextArea skins packaged with the most recent
Apache Flex SDKs.  The default is currently
spark.skins.mobile.ScrollingStageTextAreaSkin.

If you don't need scrolling, try StageTextAreaSkin, and if you don't need
everything StageText has to offer, try TextAreaSkin.

-Alex

On 8/29/14 11:46 AM, "Tonic" <an...@hotmail.fr> wrote:

>Anybody have solution to display HTML Text in mobile application with
>Textarea (or other) and native skinning ?
>
>Thanks
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/Flex-Mobile-Application-Tex
>tarea-HTML-Text-not-work-tp7773p7791.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.


Re: Flex Mobile + Textarea + HTML Text not work

Posted by Tonic <an...@hotmail.fr>.
Anybody have solution to display HTML Text in mobile application with
Textarea (or other) and native skinning ?

Thanks



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flex-Mobile-Application-Textarea-HTML-Text-not-work-tp7773p7791.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Flex Mobile + Textarea + HTML Text not work

Posted by Tonic <an...@hotmail.fr>.
Thanks Maarten for your response.

If I not specify skin for my Textarea, the type of textfield is not 
spark.components.supportClasses.StyleableTextField but
spark.components.supportClasses.ScrollableStageText, and
spark.components.supportClasses.ScrollableStageText has not htmlText
property. If I specify the skin of Textarea, has
spark.skins.mobile.TextAreaSkin, the type is good, and the HTML is correctly
display. But there is no way to show HTML text using the default textarea
skin ? 

Thanks :)



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Flex-Mobile-Application-Textarea-HTML-Text-not-work-tp7773p7777.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Flex Mobile + Textarea + HTML Text not work

Posted by Maarten Cammaert <ma...@gmail.com>.
Hi Tonic,

This is a snippet I use for htmltext in my mobile apps

var styles:String = "p {font-weight:normal;} a { color: #405081;
text-decoration: none;} a:hover { color: #3366CC; text-decoration: none; }
a:active { color: #b60c10; text-decoration: none; }";
var myStyleSheet:StyleSheet = new StyleSheet();
myStyleSheet.parseCSS(styles);

var stf:StyleableTextField = contactTxt.textDisplay as StyleableTextField;
var format:TextFormat = stf.defaultTextFormat;
format.bullet = null;
stf.defaultTextFormat = format;
stf.htmlText = Lang[app.lang].contactTxt;
stf.width = 400;

callLater(function():void{
StyleableTextField(stf).styleSheet = myStyleSheet;
});

contactTxt.skin.invalidateSize();

This works perfect for me.

Best regards,
Maarten Cammaert


On Wed, Aug 27, 2014 at 10:27 PM, Tonic <an...@hotmail.fr> wrote:

> Hello,
>
> I try to show HTML text in a Textarea component in a mobile component.
>
> I just try a simple example (the final html text is longer and I want to
> use
> scrolling with selectable=false) :
>
>
>
> With this example, no text appears in the textarea. I don't understand why
> :) ?
>
> Thanks for your help :)
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Flex-Mobile-Textarea-HTML-Text-not-work-tp7773.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>