bokeh.models.widgets.buttons¶
Various kinds of button widgets.
Bases:
bokeh.models.widgets.widget.Widget
,bokeh.models.widgets.buttons.ButtonLike
A base class that defines common properties for all button types.
AbstractButton
is not generally useful to instantiate on its own.property type: callback:Instance(Callback)
A callback to run in the browser whenever the button is activated.
property type: icon:Instance(AbstractIcon)
An optional image appearing to the left of button’s text.
property type: label:String
The text label for the button to display.
Bases:
bokeh.models.widgets.buttons.AbstractButton
A click button.
Set up a handler for button clicks.
Parameters: handler (func) – handler function to call when button is clicked. Returns: None
property type: clicks:Int
A private property used to trigger
on_click
event handler.
Shared properties for button-like widgets.
property type: button_type:Enum(‘default’, ‘primary’, ‘success’, ‘warning’, ‘danger’, ‘link’)
A style for the button, signifying it’s role.
Bases:
bokeh.models.widgets.buttons.AbstractButton
A dropdown button.
Set up a handler for button or menu item clicks.
Parameters: handler (func) – handler function to call when button is activated. Returns: None
property type: default_value:String
The default value, otherwise the first item in
menu
will be used.
property type: menu:List(Tuple(String, String))
Button’s dropdown menu consisting of entries containing item’s text and value name. Use
None
as a menu separator.
property type: value:String
A private property used to trigger
on_click
event handler.
Bases:
bokeh.models.widgets.buttons.AbstractButton
A two-state toggle button.
Set up a handler for button state changes (clicks).
Parameters: handler (func) – handler function to call when button is toggled. Returns: None
property type: active:Bool
The initial state of a button. Also used to trigger
on_click
event handler.