Quick ComboBox question


Hi all,

My latest GUI is coming together, but I don’t like the reduced alpha for the text in the ComboBox when the GUI is first initialized. What method should I override in my Look and Feel class in order to change this?


Sean Costello


Not really sure what you mean, I thought the only time a text editor would use a reduced alpha would be when it’s not enabled (or when it’s in a parent that isn’t enabled)?


Well, alpha is reduced. I’m using more ComboBoxes in this next plugin, so I’m revisiting the issue. The text that shows when the plugin first comes up clearly has an alpha < 1.f. How should I change this?


Sean Costello


Oh, you mean the placeholder text - that’s deliberated faded, to show that it’s not actually content, it’s just there for showing messages like “type your text here!”, and disappears when you actually focus on the box. I guess you’d need to tweak the L+F to change the way it’s drawn, or just put some real content in the box and don’t have any placeholder text.


A bit of searching shows that the .withAlpha in question occurs within the ComboBox.cpp code, as opposed to anything that can be changed by the L&F. So my next question is, how do I change this if I use the amalgamated code? I have tried to avoid altering any of the Juce code, but I have a stable branch that works for me.

Sean Costello