[IPython-dev] More widget feasibility ideas

Adam Hughes hughesadam87 at gmail.com
Sat Oct 25 20:12:46 EDT 2014


Awesome, thanks so much!

On Sat, Oct 25, 2014 at 7:51 PM, Nicholas Bollweg <nick.bollweg at gmail.com>
wrote:

>
> 1.   pop up a short description of the function
>>
> The bootstrap popover would be a good way to do this:
> http://getbootstrap.com/javascript/#popovers
>
> Unlike some of the bootstrap components, you can't just add it with DOM
> attributes, though, and actually need to do some JS. Here's a relatively
> simple way to get a popover:
> https://gist.github.com/bollwyvl/7c1d9606bc31272c825a
>
> It has a lot of limitations: a better one would do a full container in the
> popup body, expose all the options, etc.
>
>
>> 2.  state information
>>
> Again, bootstrap mostly has you covered:
> http://getbootstrap.com/components/#alerts
>
> widgets.HTML(
>     value="X",
>     _dom_classes=["alert alert-danger"]
> )
>
> When you want it to be something else, you would just change the value and
> the _dom_classes.
>
>
>> 3.  tabbed-view
>>
>
> There is already a tabs widget, which subclasses Box:
>
> widgets.Tab(
>     _titles={0: "A", 1: "B"},
>     children=[widgets.Box(), widgets.Box()]
> )
>
> It should be pretty easy to adapt this to your layout, and it can be
> switched programattically with selected_index.
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20141025/7c6f2b97/attachment.html>


More information about the IPython-dev mailing list