Languages

Menu
Sites
Language
How to show html text in UI control except Tizen::Web::Controls::Web?

HI,

Please let me know how to show html text/content in UI control except Tizen::Web::Controls::Web.

I do have html content to show in every list item. So which control will be useful to show directly html content in that list ?

 

Also how i can create Label in native app page, so that it can automatically adjust its size according to text inside it ?

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

8 Replies
Sagar Patil
..
wil smith
If it is plain text, then you can use TextBox or EditArea. For your second question, you can resize the bound of your label control based on your text size. By default it won't resize for you.
Sagar Patil
Thank you Wil for replying to queries. 1.Text that I want to show contains html tags and special html symbols like "

I wrote this for a “Picture’s worth 1000 words” challenge.

" and this text is part of my listItem in list. So showing this text in Label/Textbox, displays it as plain text same as above not like this "I wrote this for a “Picture’s worth 1000 words” challenge." 2. For my second issue, how can I calculate bounds for label with text size, so that label size will change according to text length? I mean if text to show is "test text" then label width and height should be less and if text to show is large i.e. 2-3 lines then label size (both height and width ) should be large. How to calculate that label size ?
Sagar Patil
Sorry. Text i wanted to post above actually like looks like text below . As it has html tags and special characters it got displayed correctly on browser. :) < p >I wrote this for a “ ;Picture& #8217 ; s worth 1000 words & # 8221 ; challenge. < / p > I want to display text like this.
wil smith
HTML tags can only be interpreted by web control, no other control can help. For size calculation of cotrol bound you can have your own logic. e.g., Required area = font size * No. of caracters.
Sagar Patil
Thanks Wil..
Sagar Patil
Is there any way to decode HTML special symbols (e.g. "  ;") to normal characters so that it can be shown in Label/Textbox? Finding and replacing special html characters in whole text takes more time as my text is too large.
wil smith
The only way I can see is to render the HTML source and decide how to intreprete special symbols.