☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Changing slider widgets value in callback function

Community Support
kylemichaelgrier
kylemichaelgrier

Hey,

I’m trying to update a slider widget’s value attribute in a callback function by a TextInput widget. I pass the slider widget object into the CustomJS function with the CustomJS function looking like this:

TextInput(title=“Enter UTC Time”, callback=CustomJS(args=dict( slider=slider), code=code))

The statement I’ve been using to try to change the slider is:

slider.get(‘value’) = 10;

slider.trigger(‘change’);

This is not working though.

Thanks for the help,

Kyle

⌁   Link to post
Bryan
Bryan

Hi Kyle,

The "slider.get" is a method to get the value, to set it you'll want "slider.set("value, 10)"

Note that in an upcoming release you'll just be able to do "slider.value" and "slider.value = 10"

Byran

···

On Jun 16, 2016, at 3:15 PM, kylemichaelgrier@gmail.com wrote:

Hey,

I'm trying to update a slider widget's value attribute in a callback function by a TextInput widget. I pass the slider widget object into the CustomJS function with the CustomJS function looking like this:

TextInput(title="Enter UTC Time", callback=CustomJS(args=dict( slider=slider), code=code))

The statement I've been using to try to change the slider is:

        slider.get('value') = 10;
        slider.trigger('change');

This is not working though.

Thanks for the help,

Kyle

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/02e32328-95f3-4662-bb11-65f9e5d6a8e0%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post

End of archived discussion · Replies are disabled