Cabbage Logo
Back to Cabbage Site

Checkbox toggling options

Hi all,

I am wondering if anyone has any experience toggling between checkboxes cabbage. When the first checkbox is on and I press the second checkbox, I want it to turn off the first checkbox. I have it working to some extent in this example but it glitches after you do it once. I think I need to get it to reread the first CabbageSetValue but I am not exactly sure how to.
Menu System 1B - Buttons.csd (724 Bytes)
If anyone has any suggestions I would be delighted because I’m sure I’m missing something very simple.

I have attached the Csound File of one of the methods that works mostly like I want it to.

Cheers Mark.

Hi @Mark7951, this examples works as expected here. The checkbox on the right disables the checkbox on the left. What glitches are you referring to?

So it will do it once, but then when you press the left checkbox again once the right one is on, they both are lit up. I only ever want one to be lit up. It’s not so much of a glitch, I know it is more really I have done something wrong in the code.
I have attached a video link so you know what I mean.

Sorry if I was vague in the last post.
Many thanks,

Putting them in a radiogroup will give you want you want, I think? And then you don’t need to code anything.

Thats brilliant thanks very much. That should work for what I am doing in the grand scheme of things.

Cheers again. :+1: