PDA

View Full Version : Selectfield



Excell
28 Nov 2011, 1:49 PM
Hi All

When you set a Selectfield.disabled:true

It greys the lable and the field display

When you re-enable it

selectfield.disabled:false

It stays grey. (It still works as normal its just an apperance problem)

Is it meant to do this ?

How can i get it to go back to the defaul look ?

Many thanks

Excell

mitchellsimoens
29 Nov 2011, 6:19 AM
When you go to re-enable it, do you use the setDisabled method on it or just change the property?

Excell
29 Nov 2011, 7:02 PM
Hi There

I am just changing the property

I am assuming there is more than one way to do this then ?

Could you show me an example please

Excell

mitchellsimoens
29 Nov 2011, 8:07 PM
Just changing a property won't really do anything. You have to use a method as there are things that have to happen. Plus, JavaScript doesn't tell the Object when something has changed so you can change properties but unless something looks to see if it has changed, nothing will happen.

Excell
29 Nov 2011, 9:42 PM
Ok

I see where your comming from

I have set the selectfield to disabled

selectfied.disabled= true;

EDIT

I used selectfield.disable(false) which does activate it the same as
selectfied.disabled= false;

but it works as before but the text is still in light grey not the default black.

This is just a visual problem, How do I get the text to return to the default black ?



Thanks in advance

Excell

Excell
1 Dec 2011, 3:51 PM
Ok

I got what you mean.
Me just not understanding

selectfeild.disabled() <---- turns off greys out
selectfield.enabled() <----turn on put back to normal


Fantastic

Thanks for the help

Excell