not clear how to transition from interact to custom layout widgets
See original GitHub issueFor example, this does not work:
vb1 = VBox([x, xmin,xmax])
vb2 = VBox([y, ymin, ymax])
vb3 = VBox([c, cmin, cmax])
box = HBox([vb1, vb2, vb3])
display(box)
for cols in box.children:
for wdg in cols.children:
wdg.observe(plot, names='value')
The intended behavior is like this:
interact(plot,
x=x,
y=y,
c=c,
xmin=xmin,
xmax=xmax,
ymin=ymin,
ymax=ymax,
cmin=cmin,
cmax=cmax
)
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (10 by maintainers)
Top Results From Across the Web
Reuse layouts with <include> - Android Developers
Although Android offers a variety of widgets to provide small and reusable interactive elements, you might also need to reuse larger ...
Read more >Output widgets: leveraging Jupyter's display system - ipywidgets
You can also append output directly to an output widget, or clear it programmatically ... One simple way to customize how an interact...
Read more >Layout Management - Qt for Python
Custom Widgets in Layouts#. When you make your own widget class, you should also communicate its layout properties. If the widget uses one...
Read more >Page Builder - BigCommerce Support
Using Page Builder; Theme Styles; Adding widgets; Layers; Layout widget; Text widget ... Go to Storefront › Themes › Customize to launch Page...
Read more >Optimize Cumulative Layout Shift - web.dev
That's not great, but when the responsive image is loaded they will be reset, so it will be given the correct dimensions—just later...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think it is probably better to build a grid container widget that can be used outside of interact as well, perhaps using the new css grid spec for layout. Between having such a container, and using tools mentioned in #1021, I think it could be relatively easy to make a grid of controls in an interact-type situation.
I would like to add something because I also encountered the same problem. I will use the same example of @denfromufa
First of all you don’t need to refer to the w.children but in the final HBox you can directly use the widgets x, y, c etc … You only need w.children[-1] for the output
finally when you display your box this will only display the widgets and not the output of the function until you interact with the box
so for example if you call
display(box)
you will see the widgets but not the plot (only until you click on any widget) to solve this yo have to callw.update()
in fact the interactive class has an event called on_display that calls the update method