Monster
Monster

Reputation: 189

test if a text field is ReadOnly extjs 4

I'm using EXTJS, i have a field that i've marked as readonly (using this : Ext.getCmp('myCmp').setReadOnly(true);).

My need is to test if 'myCmp' is set to readOnly?

I've checked the documentation and i did'nt find any think, i'm quite sure that i'm messing some think. Any help ?

Upvotes: 1

Views: 2086

Answers (1)

Daydreaming Duck
Daydreaming Duck

Reputation: 2270

It's surprising, but you can check readOnly flag
It's sets to true if the component is read only

Ext.getCmp('myCmp').readOnly

Upvotes: 2

Related Questions