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.
Note
This is an abstract base class used to help organize the hierarchy of Bokeh model types. It is not 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:
String
The text label for the button to display.
Bases:
bokeh.models.widgets.buttons.AbstractButton
A click button.
property type:
Int
A private property that used to trigger
on_click
event handler.
Set up a JavaScript handler for button clicks.
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.
Note
This is an abstract base class used to help organize the hierarchy of Bokeh model types. It is not useful to instantiate on its own.
property type:
Enum
(ButtonType
)A style for the button, signifying it’s role.
Bases:
bokeh.models.widgets.buttons.AbstractButton
A dropdown button.
property type:
String
A default value to set when a split Dropdown’s top button is clicked.
Setting this property will cause the Dropdown to be rendered as split.
property type:
List
(Either
(String
,Tuple
(String
,Either
(String
,Instance
(Callback
) ) ) ) )Button’s dropdown menu consisting of entries containing item’s text and value name. Use
None
as a menu separator.
property type:
Bool
property type:
String
A private property that used to trigger
on_click
event handler.
Set up a JavaScript handler for button or menu item clicks.
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.AbstractButton
A two-state toggle button.
property type:
Bool
The initial state of a button. Also used to trigger
on_click
event handler.
Set up a JavaScript handler for button state changes (clicks).
Set up a handler for button state changes (clicks).
- Parameters
handler (func) – handler function to call when button is toggled.
- Returns
None