Show More
@@ -0,0 +1,4 b'' | |||
|
1 | require(["notebook/js/widget"], function(){ | |
|
2 | var IntWidgetModel = IPython.WidgetModel.extend({}); | |
|
3 | IPython.notebook.widget_manager.register_widget_model('IntWidgetModel', IntWidgetModel); | |
|
4 | }); No newline at end of file |
@@ -0,0 +1,10 b'' | |||
|
1 | from base import Widget | |
|
2 | from IPython.utils.traitlets import Unicode, Int, Bool, List | |
|
3 | ||
|
4 | class IntWidget(Widget): | |
|
5 | target_name = Unicode('IntWidgetModel') | |
|
6 | default_view_name = Unicode('IntTextView') | |
|
7 | _keys = ['value', 'disabled'] | |
|
8 | ||
|
9 | value = Int(0) | |
|
10 | disabled = Bool(False) # Enable or disable user changes |
@@ -1,9 +1,10 b'' | |||
|
1 | 1 | from base import Widget, init_widget_js |
|
2 | 2 | |
|
3 | 3 | from bool import BoolWidget |
|
4 | 4 | from container import ContainerWidget |
|
5 | 5 | from float import FloatWidget |
|
6 | 6 | from float_range import FloatRangeWidget |
|
7 | from int import IntWidget | |
|
7 | 8 | from int_range import IntRangeWidget |
|
8 | 9 | from selection import SelectionWidget |
|
9 | 10 | from string import StringWidget |
General Comments 0
You need to be logged in to leave comments.
Login now