Toggle buttons

I’m stuck … anyone have an example of how to implement a series of toggle buttons, so that when any one is selected the rest deselect.
Tried with various logic using the events from the toggle button node but to date no success.
Imagine the logic as shown in attached but this “races”.

Screen Shot 2020-02-23 at 12.59.28 pm.png

Simply drag event-only nodes from the “turned on” output ports, to the “Set Value” set to false input ports of all other buttons ?


Toggle Buttons 1.1.vuo (4.22 KB)

Ahh, thanks.
But I think a little trickier than that.
But I didn’t explain fully, I’m looking for a button set where

  1. One button is always on.
  2. Initially one button is on.
    Can’t remember what this is called in interface design … the user selects one of N options.  

Joined with initially one button is on, and one button is always on whenever a user selects another one, but maybe understanding it false ?

Toggle Buttons 1.2.vuo (4.9 KB)

BUT … as it stands the user can click on an already checked button and it turns off.
The behaviour of a “check button set” is that there is always one button active, the above should do nothing to the already checked button.

Mmm. Yeah, maybe it’s still possible, but the problem is a toggle button will always toggle when you click on it.
If you don’t have too many you could make your own toggle buttons with regular buttons & text layers.
If you have many, you can still do it, but more cables to connect. or save as a subcomp to save cables maybe.

PS the on / off text labels are just to demonstrate you can use the cables to on / off things you want.

Toggle Buttons 1.3.vuo (15.3 KB)

1 Like

Seems to me a “check box group” like this should be a feature request for the UI set of nodes?

Seems to me a “check box group” like this should be a feature request for the UI set of nodes?

Agreed. It was part of the original plan for the feature request but we couldn’t fit it into 2.0.0.

For now, here’s a composition that I think does the logic you described. (3.2 KB)

1 Like

Hi @jstrecker, I’m chasing a related thing, your comp is encouraging. Wondering if there is a way to get your setup to save its state? Save Data / Fetch Data? Would that be the only option?

Edit: ok, gave it try, looks like Save/Fetch Data might work, ideally just hangs out doing its job in the background. Not sure yet how reliable this setup is, looks like it might miss some sometimes, maybe I need a better event flow setup? I didn’t need radio buttons for this episode, but looks like your method could play nice if the Save/Fetch Data idea works out. Btw, this is set up as a row of toggles using a grid – looks like there’s no way to reposition button label text? Doesn’t work here with text on the right combined with the grid, text gets covered up. (7.2 KB)

1 Like


@jstrecker and I investigated this. It took some time, but we found a problem when rendering several Make Toggle Button nodes in the same composition. We believe that’s the cause of your reliability issue. We’ve created a bug report.

Oh, good to know!