Radio buttons

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Does anyone know how to make radio buttons on a VST plugin?
Thanx, Thomas.

Post

why make when you can reuse....

http://www.u-he.com/vstsource/

check the archive

Paul
__________________________
Paul Chana
Senior Software Engineer
FXpansion Audio UK Ltd

Post

Paul_FX wrote:why make when you can reuse....

http://www.u-he.com/vstsource/

check the archive

Paul
OK, thank you Paul but I was already working with the "c_radio_group.cpp" code to make radio buttons.
The problem is that I get my five buttons but they don't react when I mouse-click.
Moreover, if I add a slider which controls the same parameter than the buttons one, it makes the buttons react just like I wish.
But the plugin doesn't work because, probably, it can't accept controlling two times the same parameter.
Anyway, it wouldn't be nice to have this slider.
If anyone who has already worked with this code, knows the solution of my problem, it'd be great.
Thomas

Post

Hi,

you can always just put a load of individual buttons on your editor window and then when the user changes their value (basically in valueChanged(...)) you just update all the other buttons, toher than the one clicked to be off...

so if you have five buttons

COnOffButton *buttons[5];

in value changed do something like

Code: Select all

switch(..)
{

case button1:
   buttons[1].setValue(0.f);
   buttons[2].setValue(0.f);
   buttons[3].setValue(0.f);
   buttons[4].setValue(0.f);
break;
case button2:
   buttons[0].setValue(0.f);
   buttons[2].setValue(0.f);
   ...
break;
}
Hope that helps

Paul
__________________________
Paul Chana
Senior Software Engineer
FXpansion Audio UK Ltd

Post

I wrote directly to the person who wrote the "c_radio_group.cpp" code and he answered me.
I didn't realize that in the size parameter you have to put the size of ALL the area where buttons will be.
Thomas

Post Reply

Return to “DSP and Plugin Development”