May-20-2019, 09:47 PM
When the slider is altered it triggers an event that calls the connected event handler with the
that is why the event handler function must except the
To access
val
of the slider,that is why the event handler function must except the
val
argument.To access
val
in the event handler function just use the val attribute like shown below.sfreq = Slider(axfreq, 'Freq', 0.1, 30.0, valinit=f0, valstep=delta_f) sfreq.on_changed(update) def update(val): print(val)