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
Cannot create a widget whose initial state is visible=False #674
Comments
The top-level widget styling attributes are deprecated. Instead, one should use the "layout" attribute.
or
depending on whether you want the invisible widget to take its place in the layout or not. Regarding the |
You can check out the example notebook https://github.com/ipython/ipywidgets/blob/master/docs/source/examples/Widget%20Styling.ipynb for more information about the use of |
Ah, that makes sense, sorry for the noise. It might be worth backporting that style notebook back to 5.x because the one currently there doesn't mention layout at all: https://github.com/ipython/ipywidgets/blob/5.x/docs/source/examples/Widget%20Styling.ipynb |
good point, and this is not noise! |
Actually, I think there is a bug here. Shouldn't the |
Deprecation warnings actually are not enabled by default. Regarding the behavior, the problem is that the css property is read from
|
The website does not have anything: http://ipywidgets.readthedocs.io/en/latest/search.html?q=visibility&check_keywords=yes&area=default if setting
|
This example also doesn't generate an invisible checkbox:
@hainm -- looks like setting visibility to |
@SylvainCorlay -- I'd suggest two things (both of which may be impractical, I'm really not familiar with the codebase):
It is unfortunate that |
ok, I can try something like this - although beware that |
I will wait for 6.x. |
If it will be gone in master I wouldn't worry too much about it...if I get a chance maybe I'll try to flesh out the wiki page with some more details. |
One thing that we should do is consolidate
|
Closing as fixed in master and will be in 6.0. |
Just to make sure I understand, the |
That is right! Only On Nov 12, 2016 11:59 AM, "Matt Craig" notifications@github.com wrote:
|
I just found we can also use .close() methods in case you want to remove it from your notebook |
You can also use |
Could you tell me why you remove visible property ? |
Rather than conflating the visibility with hiding, we now just simply expose the separate css properties as part of a unified way of handling the css for the widget as a whole, in the You can still do everything you used to - just using |
I have multiple Box objects inside one container Box object. When I set the visibility of one of the smaller boxes to 'hidden' everything disappears. Is there a way to set only one Box object to be hidden? This problem seems to only happen if I try to set the property after it has been created. |
Can you post some code reproducing this? |
Here I am only trying to hide the title of the first box, but everything disappears.
I am making the interface for people using this version of anaconda. Thanks! |
Both |
Thanks @vidartf, didn't consider that. |
In ipywidgets 5.2.2 the code below produces a widget that is visible:
In ipywidgets 4, the checkbox wouldn't be displayed until I later set
check.visible = True
.While this minimal example is pretty silly, I do rely heavily on being able to construct a widget with some components not visible until the user interacts with other elements.
A workaround or fix would be great.
The text was updated successfully, but these errors were encountered: