Add child component in Introjucer


#1

Hey,

I'm new to JUCE and implementing my very first audio plugin right now.

I have a question about adding child components. Is it possible to do that in the wysiwyg editor in the Introjucer? For example, I have several buttons, I want to group as in further implementation it makes sense for me, to have them grouped to do operations like make all of them invisible.

If that is not possible, what is in general the best way to start a hierarchy? Declaring a group component and add the child components afterwards? But then I can't define the child components (thus the buttons in the example) in the Introjucer, can I?

Hope it was understandable, what I mean. Thanks.


#2

If I understand the question correctly, it's easy to do what you're asking.

 

In the Introjucer;

Define & design your "group" as a "New GUI Component".  That'll be saved as a .h & .cpp file.

 

When designing the window (dialog or form etc) that uses the group;  In the visual editor, subcomponents tab, add a "New Introjucer Component".  That component will have several properties on the right.  Click on the "Jucer file" file selection button and point it to the .cpp above.  And viola!

 

See the attached....


#3

Thanks a lot!!!