Hi,

I see ipywidgets as a means to turn a notebook (almost) into a webappfrom 
the user's perspective, when the code cells are hidden.
But then the remaining 'close button' enables the user to delete the 
interactive widget...
So I think it would be good to be able to optionally hide this button upon 
creation of an ipywidget.

It is easy enough to hide all such buttons in a notebook with something 
like (1)
So maybe that's enough ?
It is more convoluted to do it for a particular cell with (2)
Actually it works only from the console, after selecting the target cell.

What do you think ?
Please quickly discard if there are good reasons against.

Thx


(1)
%%javascript
$('.widget-area .prompt .close').hide()

(2)
%%javascript
var jupyter= require('base/js/namespace');
var sc = jupyter.notebook.get_selected_cell();
var db = sc.widgetarea.widget_area.children()[0];
var b = db.firstChild;
$(b).css('visibility', 'hidden');

(There is probably a more direct way)

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/1cc18888-e6eb-4dc5-a0f9-165b2f155055%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to