Cabbage Logo
Back to Cabbage Site

Possible to dynamically create a groupbox?

Possible to dynamically create a groupbox with a Macro? :thinking:

cabbageCreate "groupbox", {{ bounds(500, 0, 700, 400), channel("SynthGroup"), $GROUPBOX { }}

and then append the end } to the last widget?

cabbageCreate "combobox", {{ bounds(95, 310, 50, 20), channel("PWMode"), text("LFO", "Manual"), colour(0,95,107,0), fontColour (242, 241, 239) } }}

I think I might be missing some escape characters or syntax here…

EDIT : The groupbox is created, but is there a way to add items to it?

EDIT 1 hr later - got it!



Take a deep breath @chronopolis, you’re about to cross the rubicon!

[edit] I noticed that is not in the docs. Apologies, I’ll add it now.

Whew - hail caesar!

regarding Macros in cabbageCreate…

cabbageCreate "rslider", {{ bounds(60, 10, 60, 60), channel("PWM"), text("WIDTH"), range(0.5, 0.8, 0.53, 1, 0.001), parent("SynthGroup",) $KNOB1 }}

Doesn’t seem to take.

Yeah, that’s not going to fly. The macro stuff has always been messy and a nightmare to maintain. I think a few global S should do the trick though right?

got it sprintf w a gS worked.