Skip to content

Commit fea23fd

Browse files
committed
Add the readout_format property to float range sliders.
All of the infrastructure was there, it just wasn’t exposed to python. Fixes #347.
1 parent c031845 commit fea23fd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ipywidgets/widgets/widget_float.py

+1
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ class FloatRangeSlider(_BoundedFloatRange):
266266
default_value='horizontal', help="Vertical or horizontal.").tag(sync=True)
267267
_range = Bool(True, help="Display a range selector").tag(sync=True)
268268
readout = Bool(True, help="Display the current value of the slider next to it.").tag(sync=True)
269+
readout_format = Unicode('.2f', help="Format for the readout").tag(sync=True)
269270
continuous_update = Bool(True, help="Update the value of the widget as the user is sliding the slider.").tag(sync=True)
270271

271272
style = InstanceDict(SliderStyle).tag(sync=True, **widget_serialization)

0 commit comments

Comments
 (0)