PDA

View Full Version : 3.0 submenu in toolbar problem



gaetan
10 Sep 2009, 6:54 AM
Hi all,
I have a strange problem in toolbar & submenu with iconCls.

For example :



var tb = new Ext.Toolbar(
{
items: [
{
text: 'Marquer',
iconCls: 'flagged',
menu: {
items: [
{
text: 'Marquer 1',
iconCls: 'edit',
handler: function() {},
scope: this
}
,
{
xtype: 'button',
text: 'Marquer 2',
iconCls: 'edit',
handler: function() {},
scope: this
}
,
new Ext.Button({
text: 'Marquer 3',
iconCls: 'edit',
handler: function() {},
scope: this
})
]
}
}
]
}
);


attached is the rendered menu

I don't anderstand the difference between the rendering of these 3 buttons.

Thanks for help.

Condor
10 Sep 2009, 6:56 AM
Why are you putting buttons in a menu? The defaultType for a menu is 'menuitem' (Ext.menu.MenuItem).

gaetan
10 Sep 2009, 7:28 AM
You are right.
Thanks