Hi there,
Trying to change the text colour of a ComboBox (the text colour that is displayed while you are actually writing text) and cannot find a way to have it shown other than white.
Tried all the possible (AFAIK) setColour calls, i.e. (using red just for testing)
addAndMakeVisible (&myEditableComboBox);
myEditableComboBox.addItemList (myValuesStringArray);
myEditableComboBox.setSelectedItemIndex(0);
myEditableComboBox.setEditableText (true);
myEditableComboBox.setColour (ComboBox::textColourId, Colours::red);
myEditableComboBox.setColour (Label::textColourId, Colours::red);
myEditableComboBox.setColour (Label::textWhenEditingColourId, Colours::red);
myEditableComboBox.setColour (TextEditor::textColourId, Colours::red);
with no success. if you start editing + are in the process of writing text your text is white
Investigating into juce code I see that and editable ComboBox happens to be a ComboBox containint a Label containing a TextEditor - tried to manually change all the graphics.setColour() calls inside the textEditor and I saw that the call that makes the editing text change color is at line 521 of juce_TextEditor.cpp (using juce 5.4.5)
My next Step will be to try an editable Label to see if removing an element in the chain I can have the editing text colour work … but I suspect either I made a silly mistake or there’s a gap between the colour settings of a ComboBox and the resulting styling of the TextEditor “grandchildren”
Has anyone had this same issue - Is there a quick fix on the code to make it work?
thanks!