언어 설정

Menu
Sites
Language
[ANSWERED] Popup - how to show line breaks?

I know popup can handle long text well, by splitting into into multiple lines and providing scrolling support.

 

But the question is, let's say, I have a few lines of text that I want to display "as is" (lines broken according to the line breaks). Assuming that I can ensure that each line will not exceed the available screen width, how could I do that? I have tried inserting "\n" into the text but it is ignored.

 

Simplified, I want to display 4 lines of

"Line1"

"Line2"

"Line3"

"Line4"

each on a separate line, inside a popup.

PS: I'm using the "circle" popup, if it makes a difference.

Clues appreciated.

Platform: Tizen 2.3.2, Gear S3.

 

Thank you.

 

 

Edited by: James B on 28 2월, 2017
답변 바로가기

Responses

2 댓글
James B

Thank you Armaan.

 

How did you came to the conclusion that popup supports similar markup to entry? Most of the tags listed there don't work, but the most important thing, the "<br>" DOES work and it solves my problem. So I mark yours as the correct answer.

 

To conclude this case: before Armaan's answer, I was actually close to finding an answer myself. I found some styling notes from here: https://www.enlightenment.org/program_guide/evas/textblock_objects but this doesn't cover multiline text. I traced some notes from here: https://docs.enlightenment.org/api/evas/doc/html/group__Evas__Object__Textblock.html which says "look for expedite's text_block basic" and from there I found this one: https://github.com/kakaroto/e17/blob/master/expedite/src/bin/textblock_basic.c which, while still doesn't give a real answer, but at least it gives me a lot of tags to try out (including <br>).

 

This, together with Armaan's answer, set me on a quest to find out exactly which tags work and which ones aren't. Turns out most of them (entry's markup and the markups in textblock_basic.c) don't work, including <p>. But elsewhere I read that instead of <p>, EFL uses <ps> so I tested that, and it worked too.

 

Based on this information I searched further and finally found the only list of tags that work for popup text.

They are: <br>, <ps>, <tab>, and <b>, these are in addition to the "built-in" tags listed in https://www.enlightenment.org/program_guide/evas/textblock_objects. These, and nothing else.

 

For popups, that's all they are. For my device and platform at least, this information can only be found by searching through Tizen source code (which I happened to download for other un-related problem, also posted in this forum). I have to go to untangle from EFL's default.edc, then go down to Tizen's EFL popup.edc, then popup_default.edc, and finally the result is in HVGA-inc.edc in which it is finally listed what Tizen's EFL default textblock styles are: https://git.tizen.org/cgit/framework/uifw/efl-theme-tizen/tree/2.3-wearable/HVGA-inc.edc?h=tizen_2.3.1#n468

 

It has taken me a lot of time to find this information, if somebody from the Tizen development team read this post, I strongly suggest that you include this information somewhere, so nobody else has to go through the same pain that I did.

 

Armaan, thanks again for your help.

 

cheers!