Cabbage Logo
Back to Cabbage Site

Plants on groupbox

Hi rory,
I’ve been trying to group a set of widgets with the groupbox code. The objective, it to turn at once all the widgets invisivle or visible, depending a combobox result. So when i use the code like osme examples thta you have on the page, (the sliders one), in my case, the widgets inside the group box, disapear, can’t see them, even when i turn the groupbx visible. any suggestion?

The case, is that when i make visible the group box, only the box is visible, no the widgets inside it.

Can you send me the code so I can see what the problem is?

okkk ill put the code clearly and send you

Group box from 96 to 106 code lines.

PluginSynthm.csd (21.1 KB)

When you encapsulate widgets within a plant they will have coordinates that are relative to the parent widgets. Your widgets are there, but you just can’t see them because they are positioned 500 pixels or so to the right of the partent, NOT the main window. So instead of

groupbox bounds(326, 248, 353, 185), visible(1), text("Low Pass Filter"), identchannel("LPF2")
{
groupbox bounds(368, 264, 267, 101), colour(0, 0, 0, 255)
(...)

you should do:

groupbox bounds(326, 248, 353, 185), visible(1), text("Low Pass Filter"), identchannel("LPF2")
{
groupbox bounds(10, 10, 267, 101), colour(0, 0, 0, 255)
(...)

That should do the trick.

ahhhh okkk perfect Rory, ill do it now, didnt know about it!! Thank you!

Hmm, it looks like there is no link to the plants page in the manual. My bad. I’ll have to fix that. In the meantime, you can find the page here