ExtJS的。隐藏容器内的所有组件 [英] ExtJS. Hide all components within a container

查看:157
本文介绍了ExtJS的。隐藏容器内的所有组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



有没有办法可以隐藏窗口中包含的所有组件,而不需要单独隐藏?像

  Ext.getComponent('myWindow')。hideAllComponents(); 

我正在使用extjs 3.4。

解决方案

如果我理解你的权利,你不想隐藏你的窗口,而是窗口中的元素。所以可以这样做:

  //获取窗口,获取元素,获取所有直接的孩子与css选择器'*'
var children = Ext.get('myWindow')。getEl()。down('*')

//隐藏所有
Ext.each(children,function(child) {child.hide();});


I have a window in which I am rendering a number of components like panels etc.

Is there a way I can hide all the components contained in window without having to hide them individually? Something like,

Ext.getComponent('myWindow').hideAllComponents();

I am using extjs 3.4.

解决方案

If I understood you right, you do not want to hide your window, but the elements in your window. So can do this:

// get window, get element, get all direct children with css selector '*'
var children = Ext.get('myWindow').getEl().down('*')

// hide them all
Ext.each(children,function(child){child.hide();});

这篇关于ExtJS的。隐藏容器内的所有组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆