禁用表单面板

时间:2012-11-18 10:55:18

标签: extjs extjs4.1

我有一个formpanel,我需要在满足条件时禁用它。

if (conditionIsMet){

        var theFormPanel= Ext.ComponentQuery.query('#winId> #theFormPanel')[0];


}

但是如何禁用它?

1 个答案:

答案 0 :(得分:3)

if (conditionIsMet){
  var theFormPanel= Ext.ComponentQuery.query('#winId> #theFormPanel')[0].disable();
}

为什么在这里使用ComponentQuery查询?你不能通过id得到formpanel吗? Ext.getCmp('formPanelId').disable();

相关问题