##// END OF EJS Templates
Add int range widget
Add int range widget

File last commit:

r14241:6e057c18
r14241:6e057c18
Show More
widget.py
17 lines | 658 B | text/x-python | PythonLexer
import os
from ..widget import Widget
from IPython.utils.traitlets import Unicode, Int, Bool
from IPython.utils.javascript import display_all_js
class IntRangeWidget(Widget):
target_name = Unicode('IntRangeWidgetModel')
default_view_name = Unicode('IntSliderView')
_keys = ['value', 'step', 'max', 'min', 'disabled', 'orientation']
value = Int(0)
max = Int(100) # Max value
min = Int(0) # Min value
disabled = Bool(False) # Enable or disable user changes
step = Int(1) # Minimum step that the value can take (ignored by some views)
orientation = Unicode(u'horizontal') # Vertical or horizontal (ignored by some views)