##// END OF EJS Templates
Change orientation to Enum
Jonathan Frederic -
Show More
@@ -14,7 +14,7 b' Represents a bounded float using a widget.'
14 # Imports
14 # Imports
15 #-----------------------------------------------------------------------------
15 #-----------------------------------------------------------------------------
16 from .widget import DOMWidget
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 # Classes
20 # Classes
@@ -41,7 +41,8 b' class BoundedFloatTextWidget(DOMWidget):'
41
41
42 class FloatSliderWidget(BoundedFloatTextWidget):
42 class FloatSliderWidget(BoundedFloatTextWidget):
43 view_name = Unicode('FloatSliderView', sync=True)
43 view_name = Unicode('FloatSliderView', sync=True)
44 orientation = Unicode(u'horizontal', help="Vertical or horizontal.", sync=True)
44 orientation = Enum([u'horizontal', u'vertical'], u'horizontal',
45 help="Vertical or horizontal.", sync=True)
45
46
46
47
47 class FloatProgressWidget(BoundedFloatTextWidget):
48 class FloatProgressWidget(BoundedFloatTextWidget):
@@ -14,7 +14,7 b' Represents a bounded int using a widget.'
14 # Imports
14 # Imports
15 #-----------------------------------------------------------------------------
15 #-----------------------------------------------------------------------------
16 from .widget import DOMWidget
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 # Classes
20 # Classes
@@ -43,7 +43,8 b' class BoundedIntTextWidget(DOMWidget):'
43
43
44 class IntSliderWidget(BoundedIntTextWidget):
44 class IntSliderWidget(BoundedIntTextWidget):
45 view_name = Unicode('IntSliderView', sync=True)
45 view_name = Unicode('IntSliderView', sync=True)
46 orientation = Unicode(u'horizontal', help="Vertical or horizontal.", sync=True)
46 orientation = Enum([u'horizontal', u'vertical'], u'horizontal',
47 help="Vertical or horizontal.", sync=True)
47
48
48
49
49 class IntProgressWidget(BoundedIntTextWidget):
50 class IntProgressWidget(BoundedIntTextWidget):
General Comments 0
You need to be logged in to leave comments. Login now