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