Hi,
AGAIK there’s not any properties that directly control the color, but buttons do have a “button_type” property, that takes these values:
[http://bokeh.pydata.org/en/latest/docs/reference/core/enums.html#bokeh.core.enums.ButtonType](http://bokeh.pydata.org/en/latest/docs/reference/core/enums.html#bokeh.core.enums.ButtonType)
Setting button_type to “danger” should give you a red button.
Otherwise, it might be possible to set the css_classes property and also include some appropriate extra CSS that changes the styling of the button, but I can’t provide any details offhand. I’d suggest trying “button_type” first.
FYI I note that the enum docs nor the button docs do not have any images of what the button types look like. That would be helpful, can you make a GH issue to request this docs feature?
Thanks,
Bryan
On Jan 25, 2017, at 8:44 AM, Vivek Dwivedi vive...@gmail.com wrote:
Greetings:
Does the toggle button have attributes that allow for a change in color of the toggle box when active, i.e. going from the standard green to blue or red? Im currently using funtools to change my button functionality as below.
import functools
def handler(metadata, attr, old_value, new_value):
print(metadata[“IO”], attr, new_value) // “EIO0”, etc, for Ar
Tog_Ar = Toggle(label=“Argon Off”, button_type = “success”)
Tog_Ar.on_change(“active”, functools.partial(handler, {“IO”: “EIO0”}))
Thank you.
–V
–
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 bokeh+un...@continuum.io.
To post to this group, send email to bo...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/5ee5ae0d-e495-4420-8305-9a84ba5dee35%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.