Skip to main content
Inspiring
April 18, 2011
Question

How do I count the number of characters in a line of text?

  • April 18, 2011
  • 1 reply
  • 651 views

Hello everyone,

Problem:

I have a text field that has 2 lines for visible text. I then pass it a string to display but the string might be to long to display all of the string. My problem is that I want to count how many characters that are NOT visible in the text field. The text field has to stay the fixed size and cannot change.

Any help with this matter would be very much appreciated.

Thanks in advance for your time.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
April 18, 2011

you can easily check if the number of characters exceeds the visible region by using the maxscroll property of your textfield.  but to count the characters will be a little less direct.