How to call python_callback(event) procedure when change Select widget value

Hi, when I use events like Tap or ButtonClick , for example:

p1.on_event(events.Tap, rr(p1.name)) # when tap on plot

button1.on_event(events.ButtonClick, rr(1)) #when click on Button

call function bellow:

def rr(attributes):

def python_callback(event):

val = int(attributes)

return python_callback

I have additional Select widget, and would like when change value of Select widget to call above function to update the plot.

sel = Select(title=“Frame:”, value=“1”, options = [‘1’, ‘2’, ‘3’])

Could somebody help how to do this, like

sel.on_change(…)

Or maybe is another command.

Thanks,

Goran

Hi,

There are several examples of callbacks on Select widgets in the examples:

  https://github.com/bokeh/bokeh/tree/master/examples/app

Thanks,

Bryan

···

On Mar 20, 2019, at 2:47 PM, Goran Goki <[email protected]> wrote:

Hi, when I use events like Tap or ButtonClick , for example:

p1.on_event(events.Tap, rr(p1.name)) # when tap on plot

button1.on_event(events.ButtonClick, rr(1)) #when click on Button

call function bellow:

def rr(attributes):
    def python_callback(event):
          val = int(attributes)
         .....
     return python_callback

I have additional Select widget, and would like when change value of Select widget to call above function to update the plot.

sel = Select(title="Frame:", value="1", options = ['1', '2', '3'])

Could somebody help how to do this, like

sel.on_change(..................)

Or maybe is another command.

Thanks,
Goran

--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/47f05756-b977-4048-9dfc-d27a493cffec%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.