Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap widgets broken #197

Open
rand5 opened this issue Dec 5, 2017 · 2 comments
Open

Wrap widgets broken #197

rand5 opened this issue Dec 5, 2017 · 2 comments

Comments

@rand5
Copy link

rand5 commented Dec 5, 2017

Previous solution to wrap widgets is no longer functional:

display("text/html", "<style>.cell .widget-area .widget-subarea { flex-direction: row; flex-wrap: wrap; }</style>")

I assume this is related to changes made in ipywidgets 7.0: "Widgets are now displayed in the output area in the classic notebook and are treated as any other output."
Is there a potential workaround? I've played with injecting other bits of html via display("text/html",...) but no luck as the widgets don't seem to be readily editable.

@rand5
Copy link
Author

rand5 commented Dec 5, 2017

It seems like one way to address this is via hbox:

S1 = slider(1:1:10)
T = repmat([S1],10)
hbox(T...)

but the sliders are auto-sized to fit in a single line. If you know a priori how many sliders you want you could break it up using two calls to hbox:

S1 = slider(1:1:10)
T1 = repmat([S1],5)
T2 = repmat([S1],4)
display(hbox(T1...))
display(hbox(T2...))

But this seems sub-optimal

@JobJob
Copy link
Member

JobJob commented Dec 6, 2017

relevant: #198 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants