PDA

View Full Version : How to make SliderField and radiobutton read only?



livinglegends
12 Oct 2010, 9:42 PM
Hi,

Is there any way to make SliderField and Radiobutton read only?

I have used setReadOnly method but it is not working.

Thanks
LivingLegend

Animal
13 Oct 2010, 1:23 AM
I can't find a way to make radios readOnly! I've tried setting the input element to readonly, cancelling events etc. I cannot stop them changing state

psmacarov
13 Oct 2010, 1:30 AM
I have crazy idea)) how 2 create Radiobutton readonly
What about make listener that change state on the opposite that user choise))

Condor
13 Oct 2010, 1:32 AM
Either that or you have to disable the radio.

livinglegends
13 Oct 2010, 1:40 AM
Either that or you have to disable the radio.

What about slider?

Animal
13 Oct 2010, 1:46 AM
I would say that's an Ext bug.

The SliderField should not react to any UI manipulation when it is set to read only.

Condor
13 Oct 2010, 1:51 AM
Yes, SliderField is missing readOnly support. That should be added!

For now, would it be enough to disable the slider?

livinglegends
13 Oct 2010, 1:53 AM
Yes I know that disable option is there..

but disable option grayed component and text too much so looked not good..

so want this option

Condor
13 Oct 2010, 1:58 AM
You could use:

sliderField.slider.disabled = true;
(this will disable the slider, but it won't affect it visually)

livinglegends
13 Oct 2010, 1:59 AM
k....thanks

I will try and get back to you

livinglegends
13 Oct 2010, 2:16 AM
One more problem is

How to change boxLable of radio button, run time?

Condor
13 Oct 2010, 2:39 AM
Example (http://www.sencha.com/forum/showthread.php?84180-how-to-set-checkbox-label-dynamically&p=406231#post406231).