My TextEditor is initialized like this:
logOutput.setReadOnly(true);
logOutput.setMultiLine(true);
logOutput.setText(“bla\nblbalb\nbli”);
addAndMakeVisible(logOutput);
And I only manage to see something if I select the text. How can I make it black even that is readonly?
Hi, yes, at the beginning of my MainComponent constructor I call first thing:
setLookAndFeel(&ownLookAndFeel);
now I added logOutput.applyColourToAllText(Colours::black);
logOutput.setReadOnly(true);
logOutput.setMultiLine(true);
logOutput.setText(“bla\nblbalb\nbli”);
addAndMakeVisible(logOutput);
and it works (yey!) but does it mean I have to do that in every single text editor? I thought the LookAndFeel should apply that to all the TextEditors. What’s the point of setting this then?
This also works: //logOutput.applyColourToAllText(Colours::black); logOutput.setLookAndFeel(&ownLookAndFeel);
logOutput.setReadOnly(true);
logOutput.setMultiLine(true);
logOutput.setText(“bla\nblbalb\nbli”);
addAndMakeVisible(logOutput);
I thought if I set the lookAndFeel for MainComponent, all it’s children would have the same lookAndFeel.
It’s wierd because some of the changes I made in my ownLookAndFeel are being applied even that I didn’t set it in the child component. For example: