Using interactive
is fairly simple with multiple widgets, for example:
interactive(foo, w1=widget1, w2=widget2, ...)
However I would like to layout these widgets in a specific manner, using combinations of VBox and HBox. Question is, how can I use interative with a box?
I have tried a couple of ways such as calling interactive with the widgets of the Box then displaying the box itself but that does not seem to work.
It is in the widgets documentation:
In addition to
interact
, IPython provides another function,interactive
, that is useful when you want to reuse the widgets that are produced or access the data that is bound to the UI controls. [...] Unlikeinteract
,interactive
returns aWidget
instance rather than immediately displaying the widget. The widget is aBox
, which is a container for other widgets.
So here you already have w
as a Box container for which you can change the layout properties.
w = interactive(foo, w1=widget1, w2=widget2)