Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: g2mediagroup on November 12, 2013, 04:24:09 PM

Title: Possible to parse text into multiple text boxes/columns?
Post by: g2mediagroup on November 12, 2013, 04:24:09 PM
(http://)I'm working with a coder using NGUI...I believe 3.0 and wanted to find out if it's possible to parse text into multiple text columns/boxes...?

As you can see the large text box in the attached image (mockup) how I would like the text to be distributed. The text is coming from a database and will have different word counts, but they all fit in the mockups...

Any guidance to do so would be greatly appreciated!
Title: Re: Possible to parse text into multiple text boxes/columns?
Post by: ArenMook on November 13, 2013, 08:10:05 PM
Use WrapText (on UIFont or NGUIText, depending on which type of font you're using). This will give you formatted text. Use string.Split on that by newline character, and you will have a list of lines. Knowing the number of lines you want in each text box, you can easily do the rest.