In [2]:
from ipywidgets import *
In [3]:
IntSlider()
In [7]:
from IPython.display import display
w = IntSlider()
display(w)
In [5]:
display(w)
In [6]:
w.close() # close all of the widgets
In [22]:
display(w)
In [10]:
w.value # gets the current values
Out[10]:
In [11]:
w.value = 50 # sets the current value
In [12]:
w.keys # possible values that can be changed for the widgets
Out[12]:
In [14]:
Text(value='Hello World', disabled=True) # cannot be edited since disabled
In [16]:
# traitlet link function
from traitlets import link
a = FloatText()
b = FloatSlider()
display(a, b)
mylink = link((a, 'value'), (b, 'value'))
# the tuple here represents: (thing to link, trait of the thing to link)
# they can be unlinked using
# mylink.unlink()
In [32]:
print w.max
In [ ]: