Use TabbedComponent in instrument

Hello there,

Newbie here, still reading the docs, examples etc.
I have a basic blank instrument project running, debug is ok etc.
I’ve already make a few sliders etc. work on the interface.
Now I want to have multiple pages of controls, so afaik I need to use the TabbedComponent class.

What I’ve done so far is take the SlidersPage struct from the WidgetsDemo project and put it at the top of my PluginEditor.h - compiles fine. I also have a TabbedComponent property declared as so (in the private section):

TabbedComponent adkGuiTabs { TabbedButtonBar::Orientation::TabsAtTop };

Now in the constructor of my PluginEditor.cpp I’m doing this :

adkGuiTabs.setTitle("Demo tabs");
const auto tabColour = getLookAndFeel().findColour(ResizableWindow::backgroundColourId).darker(0.1f);
adkGuiTabs.addTab("Tab1", tabColour, new SlidersPage(), true);
addAndMakeVisible(adkGuiTabs);

… and still I can’t see the content of the tab. Any idea to help me out ?

Thanks everyone !

Olivier

Raah was just missing the :

adkGuiTabs.setBounds(getLocalBounds());

in my resized function. Now works fine.

Did you .setBounds() of the TabbedComponent in the ::resized() method of the parent component?

EDIT: Oh, d’oh, you’ve since found it. Disregard. :wink:

austrianaudioJV : man, thanks anyway for helping out ! :upside_down_face:

1 Like