Is it possible to deactivate a widget? I searched the docs but I couldn’t find anything relevant.
More specifically, what I would like to achieve is to deactivate a widget depending on the value of a different widget.
Is it possible to deactivate a widget? I searched the docs but I couldn’t find anything relevant.
More specifically, what I would like to achieve is to deactivate a widget depending on the value of a different widget.
This should do the trick
import panel as pn
pn.extension()
w1 = pn.widgets.Checkbox(name="Disable slider")
w2 = pn.widgets.IntSlider()
def disable(x):
w2.disabled = x
pn.bind(disable, w1, watch=True)
pn.Column(w1, w2)