Best way to trigger rocker state

Hello all.

I’m trying to make a function that through one button, it triggers all the other UI rockers to turn off. I tried using the op('rocker0').panel.state = 0 but I wasn’t successful. The op('x').click() works but they can be random and I would like to specify the state to not active. What would be the best way to approach this? I took a look at the panelexec and others inside the rocker0 and I’m not sure what’s the best way to do this.

Other simple question that comes attached to this, can I quickly instantiate a variable with all operators of the same type? Or it just works by specific strings?

Thanks in advance

Are you talking about the widget? In this case simply op("rocker0").par.Value0 = False
Check out the findChildren() method of the compClass (docs.derivative.ca)

1 Like

Thanks! :slight_smile:

Right, the best way to set values into widgets now is through their parameter(s) Value0, Value1… not their panel states.

1 Like