☰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

Update text in TextInput widget?

Community Support
Justace_Clutter
Justace_Clutter

You should be able to instantiate the TextWidget and then use the set method to update the “value” property of the model before you generate and save the output HTML. See:

http://bokeh.pydata.org/en/0.11.1/docs/reference/models/widgets.inputs.html

For more info on the widget.

Justace

···

On Mar 30, 2016, at 11:18 AM, Robert solli.robert@gmail.com wrote:

I’m looking for a way to update the text that is listed in a TextInput widget from inside the script that initialized the figure.

Is there a way to do this?

–

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/a80f9e95-3060-4b80-8f8f-f7abf5ab941b%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post
Robert
Robert

I’m talking about hosting a TextInput on a bokeh server and update it realtime in concert with a crosshair/hover tool. Setting the value before sending it to a session I’ve managed to do :stuck_out_tongue:

···

2016-03-30 17:29 GMT+02:00 justacec@gmail.com:

You should be able to instantiate the TextWidget and then use the set method to update the “value” property of the model before you generate and save the output HTML. See:

http://bokeh.pydata.org/en/0.11.1/docs/reference/models/widgets.inputs.html

For more info on the widget.

Justace

On Mar 30, 2016, at 11:18 AM, Robert solli.robert@gmail.com wrote:

I’m looking for a way to update the text that is listed in a TextInput widget from inside the script that initialized the figure.

Is there a way to do this?

–

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/a80f9e95-3060-4b80-8f8f-f7abf5ab941b%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

–

You received this message because you are subscribed to a topic in the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/jVFFwXsIxww/unsubscribe.

To unsubscribe from this group and all its topics, 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/13586393-102D-4C67-A051-49E5FEBC8A97%40gmail.com.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post
Bryan
Bryan

Robert, The continous mousemove type events are not currently reported back to the server. We are hoping to add a more lightweight eventing system for fire-and-forget type events, but that is future work. Is it possible you could update the text box from a CustomJS callback? The hover tool does support a CustomJS callback.

Thanks,

Bryan

···

On Mar 30, 2016, at 10:44 AM, Robert Solli <solli.robert@gmail.com> wrote:

I'm talking about hosting a TextInput on a bokeh server and update it realtime in concert with a crosshair/hover tool. Setting the value before sending it to a session I've managed to do :stuck_out_tongue:

2016-03-30 17:29 GMT+02:00 <justacec@gmail.com>:
You should be able to instantiate the TextWidget and then use the set method to update the "value" property of the model before you generate and save the output HTML. See:

Bokeh Docs

For more info on the widget.

Justace

On Mar 30, 2016, at 11:18 AM, Robert <solli.robert@gmail.com> wrote:

I'm looking for a way to update the text that is listed in a TextInput widget from inside the script that initialized the figure.

Is there a way to do this?

--
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/a80f9e95-3060-4b80-8f8f-f7abf5ab941b%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

--
You received this message because you are subscribed to a topic in the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/jVFFwXsIxww/unsubscribe\.
To unsubscribe from this group and all its topics, 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/13586393-102D-4C67-A051-49E5FEBC8A97%40gmail.com\.

For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

--
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/CA%2BAkX38so%2BodhrzZQNrrej%3Dfr1YYk_U0JqnXcqhGxh_pTF4_uA%40mail.gmail.com\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post
bscully27
bscully27

Just to confirm, the bokeh.models.widgets.markups do not have the same interactive functionality (reading updated ColumnDataSource) as other widgets like Select or CheckboxGroup?

Link to the markup objects http://bokeh.pydata.org/en/latest/docs/reference/models/widgets.markups.html

I am looking to display text dynamically. Ie based on user selections, sometimes text “abc” is displayed. Other times nothing. This is helpful for my error messages.

···

On Sunday, April 3, 2016 at 6:40:55 PM UTC-4, Bryan Van de ven wrote:

Robert, The continous mousemove type events are not currently reported back to the server. We are hoping to add a more lightweight eventing system for fire-and-forget type events, but that is future work. Is it possible you could update the text box from a CustomJS callback? The hover tool does support a CustomJS callback.

Thanks,

Bryan

On Mar 30, 2016, at 10:44 AM, Robert Solli solli....@gmail.com wrote:

I’m talking about hosting a TextInput on a bokeh server and update it realtime in concert with a crosshair/hover tool. Setting the value before sending it to a session I’ve managed to do :stuck_out_tongue:

2016-03-30 17:29 GMT+02:00 just...@gmail.com:

You should be able to instantiate the TextWidget and then use the set method to update the “value” property of the model before you generate and save the output HTML. See:

http://bokeh.pydata.org/en/0.11.1/docs/reference/models/widgets.inputs.html

For more info on the widget.

Justace

On Mar 30, 2016, at 11:18 AM, Robert solli....@gmail.com wrote:

I’m looking for a way to update the text that is listed in a TextInput widget from inside the script that initialized the figure.

Is there a way to do this?

–
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+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/a80f9e95-3060-4b80-8f8f-f7abf5ab941b%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

–
You received this message because you are subscribed to a topic in the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/jVFFwXsIxww/unsubscribe.

To unsubscribe from this group and all its topics, send an email to bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/13586393-102D-4C67-A051-49E5FEBC8A97%40gmail.com.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

–
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+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CA%2BAkX38so%2BodhrzZQNrrej%3Dfr1YYk_U0JqnXcqhGxh_pTF4_uA%40mail.gmail.com.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post
Bryan
Bryan

Hi,

I would not describe that as accurate, the text of Div, Paragraph, TextInput, etc. can all be updated at any time. See, e.g.

  https://github.com/bokeh/bokeh/blob/master/examples/howto/js_events.py
  https://demo.bokehplots.com/apps/stocks

The original question was in regard to updating in response to continuous mouse movements, and the issue at the time was not that the text box could not be updated anytime, but the lack of fine grained UI events being available to respond to.

Thanks,

Bryan

···

On May 15, 2017, at 10:03, bscully27@gmail.com wrote:

Just to confirm, the bokeh.models.widgets.markups do not have the same interactive functionality (reading updated ColumnDataSource) as other widgets like Select or CheckboxGroup?
Link to the markup objects http://bokeh.pydata.org/en/latest/docs/reference/models/widgets.markups.html

I am looking to display text dynamically. Ie based on user selections, sometimes text "abc" is displayed. Other times nothing. This is helpful for my error messages.

On Sunday, April 3, 2016 at 6:40:55 PM UTC-4, Bryan Van de ven wrote:
Robert, The continous mousemove type events are not currently reported back to the server. We are hoping to add a more lightweight eventing system for fire-and-forget type events, but that is future work. Is it possible you could update the text box from a CustomJS callback? The hover tool does support a CustomJS callback.

Thanks,

Bryan

> On Mar 30, 2016, at 10:44 AM, Robert Solli <solli....@gmail.com> wrote:
>
> I'm talking about hosting a TextInput on a bokeh server and update it realtime in concert with a crosshair/hover tool. Setting the value before sending it to a session I've managed to do :stuck_out_tongue:
>
> 2016-03-30 17:29 GMT+02:00 <just...@gmail.com>:
> You should be able to instantiate the TextWidget and then use the set method to update the "value" property of the model before you generate and save the output HTML. See:
>
> Bokeh Docs
>
> For more info on the widget.
>
> Justace
>
> On Mar 30, 2016, at 11:18 AM, Robert <solli....@gmail.com> wrote:
>
>> I'm looking for a way to update the text that is listed in a TextInput widget from inside the script that initialized the figure.
>>
>> Is there a way to do this?
>>
>> --
>> 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+un...@continuum.io.
>> To post to this group, send email to bo...@continuum.io.
>> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/a80f9e95-3060-4b80-8f8f-f7abf5ab941b%40continuum.io\.
>> For more options, visit https://groups.google.com/a/continuum.io/d/optout\.
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "Bokeh Discussion - Public" group.
> To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/jVFFwXsIxww/unsubscribe\.
> To unsubscribe from this group and all its topics, send an email to bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/13586393-102D-4C67-A051-49E5FEBC8A97%40gmail.com\.
>
> For more options, visit https://groups.google.com/a/continuum.io/d/optout\.
>
>
> --
> 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+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CA%2BAkX38so%2BodhrzZQNrrej%3Dfr1YYk_U0JqnXcqhGxh_pTF4_uA%40mail.gmail.com\.
> For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

--
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/4239aa22-4a52-45fb-9890-42b55803c212%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