How can I make the slider read-only

Is there any attribute to make the slider read-only ?

slider.disable(true);

and to enable it - slider.disable(false);