bokeh.models.widgets.buttons¶
Various kinds of button widgets.
Bases:
bokeh.models.widgets.widget.Widget,bokeh.models.widgets.buttons.ButtonLikeA base class that defines common properties for all button types.
AbstractButtonis not generally useful to instantiate on its own.property type:
Instance(Callback)A callback to run in the browser whenever the button is activated.
property type:
Instance(AbstractIcon)An optional image appearing to the left of button’s text.
property type:
StringThe text label for the button to display.
Bases:
bokeh.models.widgets.buttons.AbstractButtonA click button.
property type:
IntA private property used to trigger
on_clickevent handler.
Set up a handler for button clicks.
Parameters: handler (func) – handler function to call when button is clicked. Returns: None
Shared properties for button-like widgets.
property type:
Enum(ButtonType)A style for the button, signifying it’s role.
Bases:
bokeh.models.widgets.buttons.AbstractButtonA dropdown button.
property type:
StringThe default value, otherwise the first item in
menuwill be used.
property type:
List(Tuple(String,String) )Button’s dropdown menu consisting of entries containing item’s text and value name. Use
Noneas a menu separator.
property type:
StringA private property used to trigger
on_clickevent handler.
Set up a handler for button or menu item clicks.
Parameters: handler (func) – handler function to call when button is activated. Returns: None
Bases:
bokeh.models.widgets.buttons.AbstractButtonA two-state toggle button.
property type:
BoolThe initial state of a button. Also used to trigger
on_clickevent handler.
Set up a handler for button state changes (clicks).
Parameters: handler (func) – handler function to call when button is toggled. Returns: None