Widget retention

I have a Rackspace panel that uses two widgets: a White Slider and a TextLabel.

I can change the slider manually by moving the slider.
I can change the Text Label using GPscript: EG: SetWidgetLabel(My_Label, “HELLO WORLD”)

Both work fine. However when I exit and save the gig file and then open the gig file once again. The White Slider widget has retained its value but the Text label goes back to its original state.

When I move from variation to variation the White Slider changes accordingly with each variation, but the Text Label doesn’t change with each variation … instead, it remains constant across variations.

I was led to believe that Widgets align their values to each variation. The White Slider does this, but the Text Label Widget does not. Is this my misconception or am I doing something wrong?

Label widgets are mainly intended to display text. The text of a label widget (or the text of any other widget for that matter) are not saved with variations.

However, as of GP 4.7, under certain circumstances, label widgets can also have values and those values will be stored per variation just like any other widget.

OK, you only save value type Widgets.

If you are already using scripting to update the text label, then you can use the On VariationChanged callback to change the text for each variation.

Actually, I wasn’t totally clear with my previous answer and I’ve edited it to correct it.

Any widget (even the shape widget) can have a value and the value will be tied to the variation.

The effect of a value on a shape widget is to control the brightness

For example, here is a label widget tied to the output MIDI channel number for input channel 1 of a MIDI In Block. The label is inside a shape widget whose value is also tied to that same parameter. As the parameter changes, the label updates and the shape gets brighter

2024-02-28 16-12-03.2024-02-28 16_12_17

Thank you. This is very helpful. :slight_smile:

I did know that doing a SetWidgetValue(My_Label, 80) changes the brightness to 80%.

This sounds good, can’t wait to try it.