Skip to content
This repository has been archived by the owner on Nov 28, 2019. It is now read-only.

Added display option to Widgets #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions paramnb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,12 @@ class Widgets(param.ParameterizedFunction):
layout = param.ObjectSelector(default='column',
objects=['row','column'],doc="""
Whether to lay out the buttons as a row or a column.""")



display = param.Boolean(default=True, doc="""
Whether or not to display the widgets. Useful for batch running
notebooks.""")


def __call__(self, parameterized, **params):


Expand All @@ -193,7 +197,8 @@ def __call__(self, parameterized, **params):
layout = ipywidgets.Layout(display='flex', flex_flow=self.p.layout)
vbox = ipywidgets.VBox(children=widgets, layout=layout)

display(vbox)
if self.p.display:
display(vbox)

if self.p.on_init:
self.execute(None)
Expand Down