For reference:
def update_B(attrname, old, new):
“”"callback A
“”"
Avalue = A_select.value
#new option selecting stuff here
#Aselectedvalue = 2
#Bnewoptionslist = 2.1, 2.2, 2.3
B_select.options=Bnewoptionslist
#How to update to widgets displayed value from newoptions set
B_select.update(‘value’ = new displayed value)
def update_Plot():
Aval = A_select.value
Bval = B_select.value
#source update stuff
#initialize
A_select = Select(value=‘1’, title=‘Set’, options=[‘1’,‘2’,‘3’])
B_select = Select(value=‘1.1’, title=‘Subset’, options=[‘1.1’,‘1.2’,‘1.3’])
X_button = Button(label=‘Update’)
#callbacks
A_select.on_change(‘value’, update_B)
X_button.on_click(update_Plot)
···
On Friday, August 5, 2016 at 11:49:27 AM UTC-5, Sarah Bird wrote:
Have you tried
widget.options = [new, options, here]
On 8/5/16 9:17 AM, rick wrote:
Need some hints on how to update select widget
values from other widget callbacks. I have 2 select widgets.
Select widget A’s callback modifies select widgets B’s options
list, which changes select widget B’s displayed value. How do I
update select widget B’s value to the updated display value
without having to physically select it. I would expect something
like B_select.update, but that doesn’t work.
-rick
–
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/758462a3-08d7-4e57-9202-018033088414%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/758462a3-08d7-4e57-9202-018033088414%40continuum.io?utm_medium=email&utm_source=footer).
For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).
–
Sarah Bird
Developer, Bokeh
[
<img alt="Continuum Analytics" src="https://lh6.googleusercontent.com/proxy/VYgVjggTk1hCXSN9wFkffE3I6kxTvJ51tT4KvDXOuKbs1WyFG66k7kt2-vkDimbyxfWtP-d1paJmstMYhPPnDYSUF4rLPoYM2GM2QFM=w5000-h5000" style="width:150px;min-height:30px" height="30px" width="150px">
](http://continuum.io)