I use a lookandfeel class and set the TextEditor::backgroundColourId in the constructor. Then painting the background with:
void MyLookAndFeel::fillTextEditorBackground (Graphics& g, int /*width*/, int /*height*/, TextEditor& textEditor)
{
g.fillAll (textEditor.findColour (TextEditor::backgroundColourId));
}
All is fine, except as soon as text is entered in the texteditor, the background color resets to white…
Changing to:
void MyLookAndFeel::fillTextEditorBackground (Graphics& g, int /*width*/, int /*height*/, TextEditor& textEditor)
{
g.fillAll (LookAndFeel::findColour (TextEditor::backgroundColourId));
}
solves the problem, but is this the right way to do this?