Slider textbox highlight question


#1

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!!!

Thanks,

Sean Costello


#2

Maybe I’m missing something, but a

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

should work.

Chris


#3

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

Sean


#4

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.


#5

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

Sean Costello


#6

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);

Chris