Slider textbox highlight question

Hi everyone:

My latest plugin has the slider text boxes written in white against a black background. Which works well, until someone wants to enter a new value. Then you have white text against white.

Any suggestions on what I can change? Hopefully it is something simple. I’m a little sleepy this morning, so it is very possible I am overlooking the obvious solution.

BTW, this error got me called “a moron who can’t draw” on a forum this morning. Developing plugins is FUN!!!


Sean Costello

Maybe I’m missing something, but a

texteditor->setColour(TextEditor::highlightedTextColourId, Colours::black);

should work.


Does that work? It doesn’t seem to do the trick here.


i think it might not, my suggestion is to do what i do, write a custom LookAndFeel and apply it to the slider i think createSliderTextBox is the method you are looking for.

Good idea. I have a custom look and feel for my sliders and knobs, so I’ll override createSliderTextBox there. Thanks!

Sean Costello

I was missing something, it’s about a slider’s texteditor. :slight_smile:
In this case this should work:

getLookAndFeel().setColour(TextEditor::highlightedTextColourId, Colours::black);