[英]how to implement Tab panel inside Widget with extjs?
I'm trying to implement TAB-panel inside widget. 我正在尝试在小部件中实现TAB-panel。
i can see it, but totally in wrong place... here is the Code of VIEW how can i place it inside widget.TESTusersettings???? 我可以看到它,但完全在错误的地方...这里是VIEW的代码我怎么能把它放在widget.TESTusersettings ????
I suppose renderTo: Ext.getBody()
is not correct here... whar do you mean? 我想renderTo:
Ext.getBody()
在这里不对...你是说什么意思?
Ext.define("TEST.view.settings.UserSettings", {
extend: "Ext.window.Window",
alias: "widget.TESTdusersettings",
requires: [
"TEST.overrides.LocalComboBox",
"TEST.common.LocaleManager",
"Ext.form.Panel"
],
width: 600,
height: 300,
border: false,
closeAction: "hide",
resizable: false,
layout: "fit",
title: 'User Settings',
initComponent: function() {
debugger;
Ext.create('Ext.tab.Panel', {
width: 300,
height: 200,
activeTab: 0,
items: [
{
title: 'Userdata',
bodyPadding: 10,
html: 'A simple tab'
},
{
title: 'Connections',
html: 'Connections one'
},
{
title: 'Payment',
html: 'Payment one'
},
{
title: 'Bills',
html: 'Bills one'
}
],
renderTo: Ext.getBody()
});
}
});
Change the init to this. 将init更改为此。
initComponent: function() {
var me = this;
Ext.applyIf(me, {
items: Ext.create('Ext.tab.Panel', {
activeTab: 0,
items: [
{
title: 'Userdata',
bodyPadding: 10,
html: 'A simple tab'
},
{
title: 'Connections',
html: 'Connections one'
},
{
title: 'Payment',
html: 'Payment one'
},
{
title: 'Bills',
html: 'Bills one'
}
]
})
});
me.callParent(arguments);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.