1 Reply Latest reply on Oct 28, 2012 8:24 PM by Sean_Wilson

    figure out total lines required for a paragraph in text fields

    wfzen Level 1

      In a program I'm working on, I need to know total line of the text and align the object below based on the total lines of the previous text block.

      The only way I can think of is to have a list with measured the width in pixels of all the letters. then read the word and characters of text. Add to the total width of the text. if it reaches the defined width. that word moves to the next line and add 1 to the total line and start the total width from the total width of the word that is wrapped to the next line.


      I wonder if there is a simpler way to know the last words of each line in a wrapped text line/


      Thanks for your help,