Can't get Segmented Control Buttons to work via Enable / Disable style

I’m trying to created Segmented Control buttons.

My goal is for when I click a button in the array, the clicked button will flip to its “enabled” state/style, and all the other buttons will flip to their “disabled” state / style.

My solution (that isn’t working) is to set up an OnClick case on each button, making the clicked button Enabled, and flipping the other ones to Disabled.

When I preview the prototype, clicking any of the buttons has zero affect on anything.

segmented control button.rp (56.9 KB)

Buttons two through 5 are disabled - so the click actions on them will not fire.

You might instead consider using what you have with a selection group. It will enable you to click the buttons as well as simplify the logic. Have a look at the attached.

To accomplish this I set the default state to your disabled style and defaulted the first button to selected. Then, set the selected style to your enabled style and remove all disabling. I also assigned a selection group to the buttons so all if you have to do is set selected = true on the current widget and the other buttons will automatically switch state.

segmented control button.rp (56.1 KB)