Author Topic: Possible to parse text into multiple text boxes/columns?  (Read 2950 times)

g2mediagroup

  • Guest
Possible to parse text into multiple text boxes/columns?
« on: November 12, 2013, 04:24:09 PM »
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!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Possible to parse text into multiple text boxes/columns?
« Reply #1 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.