interaction_dropdown_menu.py — Anaconda Enterprise 4.4 documentation

Anaconda Enterprise: Documentation

# interaction_dropdown_menu.py

    from bokeh.io import output_file, show
    from bokeh.layouts import widgetbox
    from bokeh.models.widgets import Dropdown

    output_file("dropdown.html")

    menu = [("Item 1", "item_1"), ("Item 2", "item_2"), None, ("Item 3", "item_3")]
    dropdown = Dropdown(label="Dropdown button", button_type="warning", menu=menu)

    show(widgetbox(dropdown))