setTabBackgroundColour also sets the color of component


#1

Hi,

I am using setTabBackgroundColour(0,Colours::lightblue) on the TabbedComponent to set the color of the tab at index 0.
But it also sets the color of contentComponent for the tab at index 0 to lightblue.

Could you please let me know the fix for the issue ?

Regards,
Yogi.


#2

The content component doesn’t actually have a “background colour” that can be set. What you’re seeing is the TabbedComponent filling its own background underneath the content component, to make it match the tab, because that’s what 99% of people will want to see. But you could create a custom look and feel to make it draw anything you want instead.


#3

Hi Jules,

Thanks for the reply.
I am able to fix the issue now.

Regards,
Yogi.