PLEASE HELP! Issue with text.
in
Programming Questions
•
9 months ago
I am trying to limit the number of characters are in a section before the user cannot type anymore.
Any help would be great! here is what I have in that section already:
if (textBoxFocus == 0)title += key; //if the 'title' box is selected, let the user write in it.
if (textBoxFocus == 1)description += key; //if the 'description' box is selected, let the user write in it.
if ((title.length() % 12) == 0) title+='\n'; //if the letters writen in the'title' section reach over 12, start a new line.
if ((description.length() % 20) == 0) description+='\n';// if the letters in the 'description' section reach over 20, start a new line.
Any help would be great! here is what I have in that section already:
if (textBoxFocus == 0)title += key; //if the 'title' box is selected, let the user write in it.
if (textBoxFocus == 1)description += key; //if the 'description' box is selected, let the user write in it.
if ((title.length() % 12) == 0) title+='\n'; //if the letters writen in the'title' section reach over 12, start a new line.
if ((description.length() % 20) == 0) description+='\n';// if the letters in the 'description' section reach over 20, start a new line.
1