如何访问或引用TitleBar
Ext.Panel
组件
代码
Ext.define('appv.view.ContactInfoPanel',{
extend:'Ext.Panel',
xtype:'contactinfopanel',
requires: [ 'Ext.TitleBar','contactapp.view.ContactInfo'],
config:{
layout:'vbox',
items:[{
xtype: 'titlebar',
height:'65px',
center:true
},{
xtype:'contactinfo',
}]
},
initialize:function(){
// Here i want to access the TitleBar and set its title dynamically
}
});
答案 0 :(得分:0)
使用ComponentQuery
选择器:
var bar = this.down('titlebar'); // Get child item at any depth by xtype