Before a recent update to the code and docs, I had a radio button library set up that would, when you clicked a button, just loop through the buttons, turning that one on and the others off. A recent update has deprecated that and I’ve switched to the new paradigm, where you use the setRadioGroupId() function and let setToggleState() handle that loop my old code was doing.
There’s one problem, that I think is a bug. No matter what I do, the first button in the radio group that is graphically visible in the program–that is, addAndMakeVisible() has been used on it and it has set bounds that aren’t zero–refuses to ever not be toggled on, whether you click another button in the group (results in both of them being on) or try to click it off. I tried making a button that is visible but has its bounds set to all zeros and adding it to the group before all the other buttons. Even then, it was still the second button added–the first one that is graphically visible–that refused to turn off. The only change was that it started out off, but it wouldn’t go off again once it was toggled on.