I would like to set the colour of the outline on a textbutton to same as the background or transparent to make the outline disappear.
I have set other outlines with lookAndFeel very easy like this:
getLookAndFeel().setColour(juce::Slider::ColourIds::textBoxOutlineColourId,
juce::Colour(0.0f, 0.0f, 0.0f, 0.0f));
I had the same “issue” and by checking the code for drawing a button background I found it uses ComboBox::outlineColourId colour to draw the outline.
So, you just need to set that colour to change the button outline.
Wow, I checked the source because I couldn’t believe it:
I think that should be at least documented, since TextButton and ComboBox are competely unrelated.
But IMHO it should get it’s own colourId TextButton::outlineColourId, even though that changes behaviour. It’s rather a bug to start with.
I was stumped on this today, then searching brought me here. I’m definitely suprised that I’m now using the juce::ComboBox::outlineColourId of a button to set its outline colour. I mean it works, but should it?