April 2018
Beginner
238 pages
7h 13m
English
We can use this script:
from ipywidgets import *from IPython.display import displayslider = widgets.FloatSlider() message = widgets.Text(value='Hello World')container = widgets.Box(children=[slider, message])container.layout.border = '1px black solid'display(container)
This results in a display:

The container box instantiates like other widgets. The difference is that we pass in the list of contained widgets in its constructor. Once constructed, we can add different adornments, such as a border. Then, like other graphical elements, we display the container, which automatically draws its contained widgets as well.