[英]Adding component to tabbed pane in ExtJS
I am trying to make a little proof of concept in ExtJS . 我试图在ExtJS中进行一些概念验证。 I would like to add a panel with a tree into one of my tabs, but I can't seem to find the answer in the API.
我想在其中的一个标签中添加一个带有树的面板,但是似乎无法在API中找到答案。
The examples look like this 例子看起来像这样
var tabs = Ext.create('Ext.tab.Panel', {
items: [
{
title: 'Tab 1',
html : 'A simple tab'
},
{
title: 'Tab 2',
html : 'Another one'
}
],
renderTo : Ext.getBody()
});
However I would like something like this : 但是我想要这样的事情:
var treegrid = Ext.create('KitchenSink.view.tree.TreeGrid', {....});
var tabs = Ext.create('Ext.tab.Panel', {
items: [
{
title: 'Tab 1',
html : 'A simple tab'
},
{
title: 'Tab 2',
myComponent : treegrid
}
],
renderTo : Ext.getBody()
});
I would like to know what i should put at myComponent . 我想知道我应该在myComponent放置什么。 Obviously myComponent is not correct.
显然,myComponent不正确。
Sorry if this question seems really naive. 抱歉,这个问题似乎真的很幼稚。 I am VERY new to ExtJS.
我是很新的ExtJS的。
The grid is a subclass of panel, so it just goes in directly under the tabs: 网格是面板的子类,因此它可以直接在选项卡下进入:
new Ext.tab.Panel({
items: [{
title: 'My Grid',
xtype: 'gridpanel',
columns: [],
// Other grid stuff
}]
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.