-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Is there a way to disable sliders, like setDisable() in Button and other components?
This component didn't provide that method.
there are several work around,
1.put a transparent div over it. (better put the gray opacity=.5 :D)
2.listen to drag event, set the value back to 0 when drag event happen
3.write javascirpt to disable the slider's action
BTW, most of input box support setDisable()
Thank you for your reply, that was useful.
hologrinder,
do you have a working solution for this? I'm currently struggling with disabling my sliders.
thanks,
Chris
I disable slider action with override method makeDraggable() and method doClic() native from zk
with function override _makeDraggable:
function() {" "this.drag = new zk.Draggable(this, this.$n(\"btn\"), {" "constraint: this.orient || \"horizontal\"," "starteffect: this.startDrag," "change: this.dragging,"+ "endeffect: this.endDrag"+ "});"+ "zk.Draggable.prototype.updateDrag = function(){}" "}
and override function doClic_():
function(){}
It is my solution from this problem.
I don't get it. Why didn't they resolved this in zk 7.0.0 API?
They didn't extend the slider to inputElement (where the disabled is implemented) but it's still an input element!
And yet there are more parts except disable very intresting to implement. Take now the constraints.
I want to have a slider from 1 to 1000 but there is a range what you may not choose. Example 200 to 300 is forbidden.
TabIndex very handy if you can get there when your mouse is broken, and then shift with your arrow keys.
readOnly => maybe some roles may not slide this thing.
....
So I propose to let the slider extend to InputElement .
Greetz chill.
Asked: 2009-06-17 01:11:37 +0800
Seen: 272 times
Last updated: Jan 08 '14