Text value with offset

Is it possible to add an offset to the [value] that a text widget shows?
I’m showing a controller value now that switches a performance of my Kemper Profiler…
The performance is always 1 higher than what is shown by the text widget…
Offsetting the [value] might be handy then…

1 Like

I think out of the box this is not possible.

No - I mean a higher value - so if the actual value is 0, it would show 1 or 10 or something like that… an adjustable offset to the actual value…

Good idea!
As a workaround you could set the caption of the widget by a little script.
The following code is for a slider widget named “slider1”:

var
slider1 : widget

on WidgetValueChanged (sliderval : double) from slider1
    SetWidgetLabel(slider1, DoubleToString(sliderval*100 +1 , 0))
end
1 Like

Ah real COOL Schamass!!! I’ll try it out!!!

To make it a bit more comfortable, you could also set the offsetvalue as a variable:

var
slider1 : widget
valoffset : double

// Called once when rackspace is first loaded
Initialization
     valoffset=1 //set the offset value that is added
End


on WidgetValueChanged (sliderval : double) from slider1
    SetWidgetLabel(slider1, DoubleToString(sliderval*100 +valoffset , 0))
end
1 Like

Thanks Schamass! I had not delved into GP scripting yet, but apparently it can solve problems or challenges :slight_smile:

…and by the way - thanks for such a lightning fast response!!! :grinning:

1 Like

I’ve been online and i had time… so: You’re welcome. :upside_down_face: :beers:

2 Likes