holoviz-topics / EarthSim

Tools for working with and visualizing environmental simulations.
https://earthsim.holoviz.org
BSD 3-Clause "New" or "Revised" License
65 stars 21 forks source link

Disabling param/parambokeh widgets #179

Closed kcpevey closed 6 years ago

kcpevey commented 6 years ago

Is it possible to set a param widget as disabled or editable or some equivalent? This would be different than precendence, which causes the widget to hide entirely. I want to display the widget, but I want it to be greyed out until I pull a trigger using another widget. I don't see any options for this in the docs and perhaps its a concept that becomes an option after we have widget interactions/dependencies?

jbednar commented 6 years ago

Right now, you can make it be readonly=True, which will make it show up as a string representation rather than as a widget. But yes, after we have widget dependencies, it would make sense for the editability to be contingent on another widget's value. Not sure how we'd express that, but it's reasonable...

kcpevey commented 6 years ago

Hmmm... I'm trying to decide if that will work for me. Is there any way to set font color on the widgets?

jbednar commented 6 years ago

I would bet there is a way using CSS, but it would take some investigation.

kcpevey commented 6 years ago

I think the param.depends work will take care of this sufficiently.