2015년 1월 3일 토요일

Setting label/button text to show two lines

Here is what I did on web:    "Dave: -----? <br> Lisa: No, I am a teacher." This would show like that:

Dave: -----?
Lisa: No, I am a teacher.

Now, is there a way to achieve this in Appinventor? I have these questions in a list. the list looks like this:

1, mc, SP, Dave: -----? <br> Lisa: No I am a teacher, sometext, sometext2

Is there a way to get the 4th item in this list and set it as the text of a label/button and make it show in two lines?



Hate to answer my own question! I knew about the \n workaround with the lists, but it seems I was trying it wrong: /n. if anyone searches a similar answer, I solved it like this:

change the <br> to \ n
"Dave: -----? <br> Lisa: No, I am a teacher." to "Dave: -----? \n Lisa: No, I am a teacher."

use the select list item to set this to a different variable, I named it questiontext.

set the label or button text to your variable, mine was questiontext.

It will show you:
Dave: -----? 
Lisa: No, I am a teacher.


댓글 없음:

댓글 쓰기