Controlling Value Of Widgets

Hi
When I first open OSC I have a switch which show none of the options currently chosen.
I select option 2 then navigate to a different tab , when I return option 2 is still selected.
I’d like the widget to reset to nothing selected when I return.

Any Ideas

Hi,
That’s really not how the switch widget is supposed to work, although you can achieve that by linking the widget to the tab container in a way that resets it: setting the switch’s value property to @{root} invalid value does the trick. The first part makes the switch watch the root container’s value (indicating currently selected tab), the invalid value part is just a way to ensure the resulting value is not recognized by the widget as a valid choice.

1 Like

Thanks Jean…
Not Sure Where To Put The Code - If I Put It In The Switches Value Property It Messes Up The Switches Options

You have to put it in the value property, not values.

wow, very clever @jean-emmanuel!