How to set the colour of the outline on a textbutton?

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:
juce::Colour(0.0f, 0.0f, 0.0f, 0.0f));

Can I do the textbutton in a similar way?

1 Like

I think one trick might be to use a label instead of a textbutton

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.

Good catch @marcsiquier