TabbedComponent fix


#1

When a new tab is added to TabbedComponent, the contentComponent might never be resized(), when the size of TabbedComponent isn’t changed (after).

Fix:
just add resized() at the end of the addTab()-Method.

[code]void TabbedComponent::addTab (const String& tabName,
const Colour& tabBackgroundColour,
Component* const contentComponent,
const bool deleteComponentWhenNotNeeded,
const int insertIndex)
{
contentComponents.insert (insertIndex, WeakReference (contentComponent));

if (deleteComponentWhenNotNeeded && contentComponent != nullptr)
    contentComponent->getProperties().set (TabbedComponentHelpers::deleteComponentId, true);

tabs->addTab (tabName, tabBackgroundColour, insertIndex);

resized();				// <------- new	

}[/code]


#2

Ok, thanks!


#3

On the TabbedComponent subject, how can I get rid of the grey line between the tabs and the component area. I tried overriding the paint routine, but the line still gets drawn.

Also I could not set the text color for the tabs. Nothing worked other than drawing the text myself. Am I missing something?