PDA

View Full Version : Menu as item of another menu



filippo.ferrari
3 Oct 2010, 12:10 PM
I'm using Designer 1.0.2.14

It's impossible to add a menu as item in another menu to create a menu-submenu system.



MyButton5Ui = Ext.extend(Ext.Button, {
text: 'Modifica',
scale: 'large',
initComponent: function() {
this.menu = {
xtype: 'menu',
id: 'MenuModificaData',
items: [
{
xtype: 'form',
title: 'Modifica Data e Ora della Chiamata',
maskDisabled: false,
collapsed: true,
items: [
{
xtype: 'datefield',
format: 'd/m/Y',
invalidText: '{value} non รจ una data valida',
fieldLabel: 'Data Chiamata',
id: 'data-modifica'
},
{
xtype: 'timefield',
fieldLabel: 'Ora Chiamata',
id: 'ora-modifica'
},
{
xtype: 'button',
text: 'Salva'
}
]
},
{
xtype: 'menuitem', <----I want to add a muenu here...!!
text: 'Menu Item'
}
]
};
MyButton5Ui.superclass.initComponent.call(this);
}
});

jarrednicholls
4 Oct 2010, 7:28 AM
Hey filippo,

In order to add a Menu to a Menu Item, you simply add the menu to the menu item......... :-)

Drag/drop a Menu onto the Menu Item. It works, trust me.

filippo.ferrari
4 Oct 2010, 7:43 AM
Ok sorry!

Menu -> Menu Item -> Menu great!

jarrednicholls
4 Oct 2010, 7:55 AM
No worries! Have a great day.