.. default-domain:: js .. highlight:: js .. module:: UI :no-index: Slider ====== .. class:: Slider A control for choosing a number by dragging a handle along a track. Added to a :class:`UI.Canvas` or a :class:`UI.Panel`. | Base class: :class:`UI.InputControl` .. container:: inherited-members .. rubric:: Inherited Members * From :class:`UI.InputControl`: :meth:`getChanged `, :meth:`setChanged ` * From :class:`UI.Control`: :meth:`getInteractable `, :meth:`setInteractable `, :meth:`getColor `, :meth:`setColor `, :meth:`getTooltip `, :meth:`setTooltip ` * From :class:`UI.Object`: :meth:`getRectTransform `, :meth:`getLayoutElement `, :meth:`getVisible `, :meth:`setVisible `, :meth:`remove ` .. method:: getValue() setValue(value) The value of the slider, between :meth:`UI.Slider.getMin` and :meth:`UI.Slider.getMax`. Setting a value outside the range is refused. :Property: Can be read or written :rtype: ``number`` .. method:: getMin() setMin(value) The value at the low end of the slider, which is its left hand end, or the bottom of a vertical slider. Must not be greater than :meth:`UI.Slider.getMax`. :Property: Can be read or written :rtype: ``number`` .. method:: getMax() setMax(value) The value at the high end of the slider, which is its right hand end, or the top of a vertical slider. Must not be less than :meth:`UI.Slider.getMin`. :Property: Can be read or written :rtype: ``number``