Hello, I’m trying to update the content of a HelpButton
. This works fine if the Tooltip
in the button has plain text, but fails to update if there is HTML content. I’ve tried updating the content directly and using the update
function, but can’t seem to get it to work. I’m running a bokeh server using Bokeh 3.1.0
from bokeh.io import curdoc
from bokeh.models import Button, Tooltip, HelpButton
from bokeh.models.dom import HTML
def update_helpbuttons():
basic_button.tooltip.content = "Updated help"
html_button.tooltip.content = HTML('<strong>Updated</strong> help')
# html_button.tooltip.update(content=HTML('<strong>Updated</strong> help'))
# html_button.update(tooltip=Tooltip(content=HTML('<strong>Updated</strong> help'), position='right'))
basic_tooltip = Tooltip(content='Basic Tooltip', position='right')
html_tooltip = Tooltip(content=HTML('<strong>HTML</strong> Tooltip'), position='right')
basic_button = HelpButton(label='Basic', tooltip=basic_tooltip)
html_button = HelpButton(label='HTML', tooltip=html_tooltip)
change_button = Button(label='Update help')
change_button.on_click(update_helpbuttons)
curdoc().add_root(basic_button)
curdoc().add_root(html_button)
curdoc().add_root(change_button)
Thanks for any help or suggestions, bokeh has been a great tool.