How to use tab control?

Hello,
I found I don’t like TabbedComponent, which looks redundant
So I try to use TabbedButtonBar, however it does not appear on the MainComponent window

I tried like below

Could you please help me with this issue? Thank you

maintab = new juce::TabbedButtonBar(juce::TabbedButtonBar::TabsAtTop);
addAndMakeVisible(maintab);
maintab->setSize(2400, 100);
//maintab->addTab("dd", juce::Colours::yellow, true,;
1 Like

It is not redundant. The TabbedButtonBar is a part of the TabbedComponent. If you use the TabbedButtonBar, you have to manage the panels it “tabs” yourself.

And you should to the placements of child components in resized(), not in the constructor.

2 Likes

Oh, thank you, Daniel !
I learned a lot from you. Now I understand
Have a nice day and see you again