##// END OF EJS Templates
Use require.js to load widget manager.
Use require.js to load widget manager.

File last commit:

r14250:e9b4d108
r14253:75ef14ea
Show More
int_range.py
17 lines | 654 B | text/x-python | PythonLexer
Jonathan Frederic
Add int range widget
r14241 import os
Jonathan Frederic
Updated imports to reflect class move
r14250 from base import Widget
Jonathan Frederic
Add int range widget
r14241 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)