I am having a hard time getting tabs to display, the code compiles and runs, but there are no tabs at the top. I have added them with the add tab function and am using addandmakevisible, and I’ve checked to see if I’m running over it with another paint function, but I don’t think I am. Thanks for any help,
DemoTabbedComponent::DemoTabbedComponent() : TabbedComponent(TabbedButtonBar::TabsAtTop)
{
auto colour = Colours::blue;
addTab(“Buttons”, colour, new Spectro(), true);
addTab(“Sliders”, colour, new Tin_Oxide_Component(), true);
};
DemoTabbedComponent::~DemoTabbedComponent() {
}
class MainComponent : public Component
{
public:
//==============================================================================
MainComponent();
~MainComponent();
//==============================================================================
void paint(Graphics& g) override;
void resized() override;
private:
//==============================================================================
// Your private member variables go here…
DemoTabbedComponent tabs;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainComponent)
};
MainComponent::MainComponent()
{
addAndMakeVisible(tabs);
setSize (1280, 720);
}
MainComponent::~MainComponent()
{
}
//==============================================================================
void MainComponent::resized()
{
// This is called when the MainComponent is resized.
// If you add any child components, this is where you should
// update their positions.
}
void MainComponent::paint(Graphics& g) {
}
