# Wordwrap line breaks in textfield

**URL:** <https://forum.kirupa.com/t/wordwrap-line-breaks-in-textfield/318559>\
**Category:** flash\
**Created:** [January 24, 2011, 4:22am UTC](https://forum.kirupa.com/t/wordwrap-line-breaks-in-textfield/318559 "2011-01-24T04:22:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajtyler](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@ajtyler](https://forum.kirupa.com/u/ajtyler)\
**Post date:** [January 24, 2011, 4:22am UTC](https://forum.kirupa.com/t/wordwrap-line-breaks-in-textfield/318559/1 "2011-01-24T04:22:32Z")

</div>

So here’s my question, when I put WordWrap on in an input textfield, all characters off the width of the textfield get put on the next line. However, when I look at the htmlText property of that textfield, I see no evidence of such a line break.

I’ve learned that’s because it’s a soft line break, and not a hard line break. My app has a feature that requries me to know the number of lines in the textfield. I had been calculating this by simply scanning through the htmlText property of the textfield and counting up the presence of “\</p\>”. However, the wordwrap soft line breaks don’t leave any evidence of such in the htmlText property.

Is there a way that I can count the “true” number of lines in a text field?
