Function to change the "visible" property of a widget with another widget

For values (number values) I know I can use the set() function. What about a property in particular?

(EXAMPLE: Directly change the "visible" property)

if (value === 0) {
// set the "visible" property [of another_widget] to FALSE
}

else if (value === 1) {
// set the "visible" property [of another_widget] to TRUE
}

or...

(EXAMPLE: Indirectly change the property, using number values/conditionals)

if (value === 0) {
// set the "visibile" property of 'this' (panel) widget to FALSE
}

if (value === 1) {
// set the "visibile" property of 'this' (panel) widget to TRUE
}

Thank you!

You have to use a variable widget, use its value in the visible property (via the @{} syntax) and update that variable's value using set().

2 Likes

A more straightforward solution will be introduced soon (Some questions about state and variables - #11 by jean-emmanuel)

1 Like

Thank you!

(my session so far)

What is the squirrel knob doing? :slight_smile:

(this)

Squirrel number 1 sends a MIDI note message (selects all MIDI parts in Cubase).
Squirrel number 2 opens a dropdown menu (with different functions related to tracks).

I would use a cat ;-), nice idea -> mimic of 3d button

1 Like