日期:2014-05-16  浏览次数:20315 次

Ext/js中头疼问题
用form.getForm().findField('JFDJ_MSSS').hide();form.getForm().findField('JFDJ_MSSS').hideLabel=true;将comboBox隐藏后;当我想显示的时候用什么方法


  我用的是fiform.getForm().findField('JFDJ_MSSS')eld.enable();      
    form.getForm().findField('JFDJ_MSSS').show();      
    form.getForm().findField('JFDJ_MSSS').getEl().up('.x-form-item').setDisplayed(true); 和
form.getForm().findField('JFDJ_MSSS').hide();form.getForm().findField('JFDJ_MSSS').hideLabel=false;可是这两种方法都有问题,只将后边下拉框显示出来 前边的文字标签没有了

------解决方案--------------------
用setVisible吧

setVisible( Boolean visible ) : Ext.Component 
方便的函数用来控制组件显示/隐藏。Convenience functi... 
方便的函数用来控制组件显示/隐藏。Convenience function to hide or show this component by boolean. 
参数项: 
visible : Boolean 
为True时显示/false时隐藏。True to show, false to hide 
返回值: 
Ext.Component 
this 



------解决方案--------------------
用disable()和enable()控制;
------解决方案--------------------

combo.show( String/Element animateTarget, [Function callback], [Object scope]);

这个方法。