PYPI package with better toggle buttons
Project description
Short Overview.
ipywidgets_toggle_buttons is a simple python package(py>=3.6) with more toggle buttons for ipywidgets
Installation via pip:
pip install ipywidgets_toggle_buttons
Long Overview.
This python package consists of other ToggleButtons classes
ToggleButtonsAutoSize - To adjust buttons size to show full their’s description
MultiToggleButtons - To select a few options at once with usual ToggleButtons interface
ToggleButtonsWithHide - ToggleButtonsAutoSize + Hidden options
MultiToggleButtonsWithHide - MultiToggleButtons + Hidden options
All of them will adjust size of buttons if options are modified.
Also they have usual interfaces to work with values and options
Simple Usage examples
Advanced Usage examples
How to add this widgets into the Box, HBox, VBox
from ipywidget import Box
wid = AnyToggleButton(
...,
func_to_get_option_width=func_new_width
)
wid_box = Box([])
def func_new_width(iter_options):
int_max_width = 0
for option in iter_options:
cur_but_width = 8 * len(option)
if cur_but_width > int_max_width:
int_max_width = cur_but_width
return int_max_width
How to access all options of the widget
Use attribute .widget to get full control over shown widget
wid = AnyToggleButton(...)
wid.widget
Links
Project local Links
Contacts
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.