Cabbage Logo
Back to Cabbage Site

Tips on radioGroup use

I’ve read through several old posts about radioGroup usage and I’m not sure what best practices are.

My use case is (hopefully!) simple. I want three buttons to be in a group. By default the middle button in pressed. If the left button is pressed, middle and right should be off. If middle is pressed, left and right should be off. If the right button is pressed, left and middle should be off.

Is radioGroup the right choice for this? Or is there a better option?

I initially hoped there would be a Widget that was an n-button group. Does that exist?

radioGroup sounds appropriate for what you want to do.

The only other simple option I can think of is listbox which will create a vertical arrangement of ‘buttons’ which will behave like radio buttons but with the convenience of outputting just a single channel.
listbox bounds(10,10,30,60), items(1,2,3), channel("nButtons"), value(1), align("centre")