87,910
社区成员
发帖
与我相关
我的任务
分享
Ext.onReady(function(){
Ext.QuickTips.init();
var menu = new Ext.menu.Menu({
id: 'mainMenu',
style: {
overflow: 'visible' // For the Combo popup
},
items: [{
text: 'AAA',
},
{
text: 'BBB',
}
]
});
var tb = new Ext.Toolbar();
tb.render('toolbar');
tb.add({
text:'Button w/ Menu',
iconCls: 'bmenu', // <-- icon
menu: menu // assign menu by instance
,
listeners : {
mouseover : function (obj,e) {
if(!obj.menu.isVisible()){
obj.showMenu();
}
}
}
});
tb.doLayout();
});