Show More
@@ -14,7 +14,7 b' Represents a bounded float using a widget.' | |||
|
14 | 14 | # Imports |
|
15 | 15 | #----------------------------------------------------------------------------- |
|
16 | 16 | from .widget import DOMWidget |
|
17 | from IPython.utils.traitlets import Unicode, CFloat, Bool, List | |
|
17 | from IPython.utils.traitlets import Unicode, CFloat, Bool, List, Enum | |
|
18 | 18 | |
|
19 | 19 | #----------------------------------------------------------------------------- |
|
20 | 20 | # Classes |
@@ -41,7 +41,8 b' class BoundedFloatTextWidget(DOMWidget):' | |||
|
41 | 41 | |
|
42 | 42 | class FloatSliderWidget(BoundedFloatTextWidget): |
|
43 | 43 | view_name = Unicode('FloatSliderView', sync=True) |
|
44 |
orientation = |
|
|
44 | orientation = Enum([u'horizontal', u'vertical'], u'horizontal', | |
|
45 | help="Vertical or horizontal.", sync=True) | |
|
45 | 46 | |
|
46 | 47 | |
|
47 | 48 | class FloatProgressWidget(BoundedFloatTextWidget): |
@@ -14,7 +14,7 b' Represents a bounded int using a widget.' | |||
|
14 | 14 | # Imports |
|
15 | 15 | #----------------------------------------------------------------------------- |
|
16 | 16 | from .widget import DOMWidget |
|
17 | from IPython.utils.traitlets import Unicode, CInt, Bool, List | |
|
17 | from IPython.utils.traitlets import Unicode, CInt, Bool, List, Enum | |
|
18 | 18 | |
|
19 | 19 | #----------------------------------------------------------------------------- |
|
20 | 20 | # Classes |
@@ -43,7 +43,8 b' class BoundedIntTextWidget(DOMWidget):' | |||
|
43 | 43 | |
|
44 | 44 | class IntSliderWidget(BoundedIntTextWidget): |
|
45 | 45 | view_name = Unicode('IntSliderView', sync=True) |
|
46 |
orientation = |
|
|
46 | orientation = Enum([u'horizontal', u'vertical'], u'horizontal', | |
|
47 | help="Vertical or horizontal.", sync=True) | |
|
47 | 48 | |
|
48 | 49 | |
|
49 | 50 | class IntProgressWidget(BoundedIntTextWidget): |
General Comments 0
You need to be logged in to leave comments.
Login now