Radio buttons
-
- KVRer
- Topic Starter
- 26 posts since 16 Jun, 2004 from Clermont-Ferrand, France
Does anyone know how to make radio buttons on a VST plugin?
Thanx, Thomas.
Thanx, Thomas.
-
- KVRian
- 742 posts since 22 Jun, 2004
__________________________
Paul Chana
Senior Software Engineer
FXpansion Audio UK Ltd
Paul Chana
Senior Software Engineer
FXpansion Audio UK Ltd
-
- KVRer
- Topic Starter
- 26 posts since 16 Jun, 2004 from Clermont-Ferrand, France
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
-
- KVRian
- 742 posts since 22 Jun, 2004
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
Hope that helps
Paul
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;
}
Paul
__________________________
Paul Chana
Senior Software Engineer
FXpansion Audio UK Ltd
Paul Chana
Senior Software Engineer
FXpansion Audio UK Ltd
-
- KVRer
- Topic Starter
- 26 posts since 16 Jun, 2004 from Clermont-Ferrand, France
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
I didn't realize that in the size parameter you have to put the size of ALL the area where buttons will be.
Thomas