Label - is there possible to make more lines?


#1

Is there any way to make Label text multilines?
If not, probably good solution is to create TextEditor, but then does anyone know how to make it not editable?


#2

Doesn’t look like JUCE Labels support multi-line at all

The TextEditor solution would be:

TextEditor myEditor;
myEditor.setMultiLine(true);
myEditor.setReadOnly(true);

// if you don't want the text to even be selectable
myEditor.setInterceptsMouseClicks(false, false);

#3

Thanks, it was so obvious setReadOnly. I am just stupid :slight_smile:
But do you know how to concatenate more strings than one in TextEditor?
textEditor.setText("some text" + "some other text);" doesn’t work.


#4

If that’s a direct paste, seems like the ending quotation mark got shifted :wink: