12 Replies Latest reply on Nov 20, 2007 10:58 AM by ChristopherCesarz

    Counting Lines in TextArea

    Daniel_Summers Level 1
      I need a way to count the lines the result from a text area's word wrap.

      In otherwords if I have a TextArea that's 150px wide and I put a string like:

      Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis.

      If the wrapping causes it to give me:

      Morbi commodo, ipsum sed pharetra
      gravida, orci magna rhoncus neque, id
      pulvinar odio lorem non turpis.

      I want to know that the result is 3 lines and they are ....

      Is this possible??... Is it something in TextLineMetrics??...

      Any help or possible work arounds would be great. Thanks in advance.