我是 EXT JS 的新手,正在尝试创建一个工具栏并向其添加一些按钮。
我遵循了 EXTJS 边框布局技术,并且窗体位于视口的中心。现在我想将按钮添加到视口的上角,在本例中为北部区域。我知道如何生成按钮和工具栏,但不知道如何在所需区域进行渲染。
这是我生成的示例代码:
Ext.onReady(function () {
new Ext.Toolbar({
items: [{
xtype: 'tbbutton',
text: 'Button'
}, {
xtype: 'tbbutton',
text: 'Menu Button',
menu: [{
text: 'Better'
}, {
text: 'Good'
}, {
text: 'Best'
}]
}, {
xtype: 'tbsplit',
text: 'Split Button',
menu: [{
text: 'Item One'
}, {
text: 'Item Two'
}, {
text: 'Item Three'
}]
}]
});
});
我想我需要帮助才能使用 renderTo 关键字,但我不知道如何使用它。