我想添加Ext.button.Split到面板的标题而不是标题.它必须类似于面板内容的切换器和同一面板的标题.extjs 4中有没有选项可以做到这一点?或者有更好的解决方案,而不是拆分按钮?不幸的是,面板标题中的切换器是关键要求,因此必须放在那里.
以下是ExtJs 4.2.2
{
xtype: 'panel',
......
header: {
titlePosition: 0,
items: [
{
xtype: 'splitbutton',
}
]
}
}
Run Code Online (Sandbox Code Playgroud)
使用工具将标题对象添加到面板并为按钮添加项目。
Ext.create('Ext.panel.Panel', {
width: 300,
height: 200,
renderTo: Ext.getBody(),
header: {
// if you want your button positioned on the right hand side add
// titlePosition: 0,
items: [{
xtype: 'splitbutton',
text: 'test'
}]
}
});
Run Code Online (Sandbox Code Playgroud)