关于Extjs获取容器和元素的方法

1、当前对象的父对象(上级对象)

this.ownerCt: 

2、当前对象的下一个相邻的对象

this.nextSibling(); 

3、当前对象的上一个相邻的对象

this.previousSibling(); 

4、当前容器中的第一个子对象

this.get(0); (这个好像在Ext6.0不能用了,我用着不好使)
this.items.first(); 

5、当前容器的最后一个子对象

this.items.last(); 

6、查找当前对象的所有上级匹配的容器

this.findParentByType(String xtype) 

7、查找当前对象的所有下级匹配的组件

this.findByType(String xtype)

8、向上匹配查找组件

this.up("xtype")  

9、向下匹配查找组件

this.down("xtype")   

10、匹配任意组件(常用)

Ext.ComponemtQuery("#id")
Ext.ComponemtQuery("xtype")
Ext.ComponemtQuery("xtype[title="..."]")
         

猜你喜欢

转载自www.cnblogs.com/jlfw/p/11912092.html