Hi, I'm attempting to display a menu when a user mouse overs a button, and when they mouseout the menu closes. However the moment you leave the button the menu closes which makes it impossible to get to the actual menu. I've tried the mouseover and mouseout events but they seem to have the same behaviour. Any help would be greatly appreciated. Example code:
PHP Code:
var win = new Ext.Window({
xtype: 'window',
title: 'My Window',
width: 400,
height: 250,
tbar: {
xtype: 'toolbar',
items: [
{
xtype: 'button',
text: 'Menu',
menu: {
xtype: 'menu',
items: [
{
xtype: 'menuitem',
text: 'Item 1'
},
{
xtype: 'menuitem',
text: 'Item 2'
},
{
xtype: 'menuitem',
text: 'Item 3'
}
]
},
listeners : {
'menutriggerover' : function(btn) {
btn.showMenu();
},
'menutriggerout' : function(btn) {
btn.hideMenu();
}
}
}
]
}
}).show();