Lock / Unlock

Since GP 4.7, we can lock or Unlock widget.
Is there a way to use this parameter in a script ?
Like SetWidgetHideOnPresentation for hide or unhide for exemple.

I am not aware of such a GP script function
What would be the use case for this?

1 Like

No it doesn’t exist, but what exactly would your use case be?

Based on this script, i want to switch 2 panel each containing a Knob volume for control a reverb send level and text label which return me the value of the reverb send.
For switching, not use a toggle switch but 2 red led.
If I click on red led 1, it’s the panel for piano reverb. Led 1 is lit, other switched off…
Same thing with led 2, panel synth appears instead of panel piano… led 2 is lit, switch off the led 1 etc… OK, all works fine. :slightly_smiling_face:

Now, it’s only for “graphic vision”.
If i’m on the 1st panel, my red led 1 is on. I can click again on this led 1, it doesn’t affect the panel of course but it switch off the led and I’d like it to stay lit.

If there was a function for that, ex (SetWidgetLockOnPresentation, true or false), it would simplify the code and write something like this :.

On WidgetValueChanged(newValue : double) from Led1
 If newValue == 1.0 then
    HideThem (synthPanel, pianoPanel)
    ResetWidgetValue(Led2)
    SetWidgetLockOnPresentation(Led1, true)
 end
End

Some photos to illustrate my point :

Panel 1 (Reverb Piano)


Panel 2 (Reverb Synth)

Panel 1 (2 successive clicks :upside_down_face:)

I also could imagine a usecase where you could define a master lock switch to enable/disable different widgets…

I see your point, but is that really necessary when playing live?

Of course, no :wink:

I would vote for it - even if it would just be for consistency’s sake…
We can change the text, the font color, the position, the hide flag… so why not the lock/unlock option as well?

I see some nice panels there :slight_smile:

Maybe you can share them here? Shared rackspaces - Gig Performer Community