How do I 'link' a widget's off/on state to toggle the visibility of a tab?

Would anyone happen to know how to 'link' a widget's off/on state to toggle the visibility of a tab? I have 5 buttons, that each bring up a tab of a container nearby. I want to make it so that if button #1's corresponding tab is visible, button #1 rests in its on state, until another button is pressed, which will bring up another tab, and the previous button's tab that has now been closed, that button shall rest in its off state until it is pressed again



("Track/Edit TABS" is the container that contains the tabs each of the buttons are linked to)

(Apologies if this has been asked before or if this is actually something very easy to solve, I'm still very new to O-S-C :smiling_face_with_tear:)

(If it helps, OSC version 1.17.0 :slight_smile:)

I just asked a similar question lately, I think it'll help~

Oh I think I already got this part set up. I just want to do it the opposite way (sort of)

What problem are you facing currently?
If you can already turn on visibility of a tab using any button, then all you need to worry about is the logic between buttons' on/off state~

Right, so how do I control the buttons' on/off state from the tabs

To my understanding, you don't need to control buttons from the tabs, if you want button to be stay on until another button(of its group of course) is hit, the simplest way is to use "switch" widget.
The buttons in a switch widget is automatically shutting down each other when hit, and you can specify what value(every button has a unique value) trigger which tab in the script.