Hi @Sandy.Dahl,
You can use the WORD WRAP feature of the textarea to split your text into multiple lines.
/**
* @fn void TextArea::setWideTextAction(WideTextAction action)
*
* @brief Sets wide text action.
*
* Sets wide text action. Defines what to do if a line of text is wider than the
* text area. Default action is WIDE_TEXT_NONE which means that text lines are only
* broken if there is a newline in the text.
*
* If wrapping is enabled and the text would occupy more lines than the size of the
* TextArea, the last line will get an ellipsis to signal that some text is missing.
* The character used for ellipsis is taken from the text spreadsheet.
*
* @param action The action to perform for wide lines of text.
*
* @see WideTextAction
* @see getWideTextAction
* @see resizeHeightToCurrentText
*/
void setWideTextAction(WideTextAction action);
Basically what you'll do is define the fixed width you know your text area will have. Define your string (either statically or by wildcards) to have any length and then call the following:
/**
* @fn void TextArea::resizeHeightToCurrentText();
*
* @brief Sets the height of the TextArea.
*
* Sets the height of the TextArea to match the height of the current associated
* text for the current selected language. This is especially useful for texts with
* WordWrap enabled.
*
* Please note that if the current text rotation is either 90 or 270 degrees, the
* width of the text area will be set and not the height, as the text is rotated.
*
* @see resizeToCurrentText
* @see setWordWrap
* @see setRotation
*/
void resizeHeightToCurrentText();
This call will respect the width of your text area and attempt to split your text into multiple lines to match that (based on occurances of 0x20 - SPACE).
Give it a try!
/Martin