"one of many" choice button group + grouping parameters in widget

For a module similar to a mixer (see below) I try to

  1. define a group of buttons (one button per channel, row ‘E’ in the screenshot) that allows the user to select the channel for which parameters are shown/edited (in the gray box). Obviously only one channel can be in ‘edit mode’ at a time.
  2. define a widget (the gray box) that contains the parameters of a channel (instead of adding them to the module widget). The idea is to create one instance per channel and control visibility via the E buttons.

My attempts so far (like creating parameter controls in the constructor of my own widget) were not really elegant and/or resulted in crashes.
Is there a ‘best practice’ for what I am trying to do? Thanks!


Looks like I found a solution to problem #2.

struct EditorWidget : OpaqueWidget
	LabSeven_R128Widget *module;
	void addParam(ParamWidget *pw)
	EditorWidget(LabSeven_R128Widget *module)
		this->module = module;
		addParam(ParamWidget::create<LSR3EditSwitch>(Vec(15,25), module->module, LabSeven_R128::MAP0101  , 0.0f, 1.0f, 1.0f));

Don’t know how much help this is but problem one is called a Radio button.


I know radio buttons from VCL, Qt etc. but I have not seen them in Rack (so far). I guess I will implement this myself.

1 Like

There will be radio buttons in Rack v. 1


So it is probably not a good idea to have a redundant implementation. I’ll use a fader and replace it later by a radio button.