Search code examples
extjsextjs4

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 ?


Solution

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

    Ext.getCmp('myCmp').readOnly