> i .. have a ScrollBar widget.
That widget displays the value of a PV and writes to that same PV when the user moves the scrollbar
> I however cannot set the scrollbar's value in my script.
If for some reason you have to use a script,
you can set the value of a PV in that script,
and if that PV happens to be the PV of the scrollbar,
that scrollbar will then update:
# Script attached to scrollbar or other widget with PV
# pvs[0]: Some input PV
#
# Writes the value from the input PV to the PV of the widget
from org.csstudio.display.builder.runtime.script import PVUtil, ScriptUtil
value = PVUtil.getDouble(pvs[0])
pv = ScriptUtil.getPrimaryPV(widget)
pv.setValue(value)
|