widgets.HTML events
See original GitHub issueHi,
I’m playing a little bit with the ipywidgets’ features, and I was wondering if there’s actually a way to add events on the HTML widget ?
My problem is the following: I’d like to create checkboxes that are actually a little bit customizable. Nonetheless, I noticed that this isn’t quite possible with the widgets.Checkbox() for now.
I used then the widgets.HTML() feature, with some css and HTML I managed to get a checkbox with some customized style. But obviously, the value of the widget being hardcoded HTML and CSS, when I try to do my_html.observe(func, names="value")
it doesn’t work.
Is there another way to implement such feature ? I’m on JupyterLab by the way.
Thank you very much, this question aside I’m really enjoying the ipywidgets’ features so far !
Michael
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (6 by maintainers)
Top GitHub Comments
We could use some docs showing a good example in this doc: http://ipywidgets.readthedocs.io/en/latest/examples/Widget Styling.html#
Another solution might be to use @mwcraig 's ipyevents which allows you to listen to lots of events on a specific widget. I am not sure about the granularity of it though (e.g. if you can listen to events on a specific part of your HTML).
I suppose it is safe to close this issue now. But feel free to reopen it if needed.