PDA

View Full Version : Adding a form panel as a menu item



dmolesky
20 Nov 2009, 8:34 AM
Hello,

I am trying to add a form panel as a menu item. When I do so, it seems that the form fields do not render correctly. I've seen in several posts that in Ext 3.0 the Ext.menu.Adapter class in no longer needed and that you can simple add panels as menu items because menu items now extend the container class. I've tried setting forceLayout: true on everything.

Here is the code for my toolbar:



tbar:[{
text:'Copy To Existing',
iconCls: 'x-btn-text-icon',
icon: '/' + RecipeManagement.WebSiteName + '/Content/app/resources/img/icons/copy.gif',
menu:{
forceLayout:true,
items:[{
xtype:'form',
layout: 'form',
forceLayout:true,
bodyStyle: { "padding" : "5px 5px 5px 5px", "background-color":"#DDE5E9" },
width:300,
height:130,
labelWidth: 50,
items:[{
xtype:'combo',
forceLayout:true,
fieldLabel:'Revision Type'
},{
xtype:'combo',
forceLayout:true,
fieldLabel:'Recipe Id'
}, {
xtype: 'button',
forceLayout:true,
text: 'Copy',
iconCls: 'x-btn-text-icon',
icon: '/' + RecipeManagement.WebSiteName + '/Content/app/resources/img/icons/copy.gif',
listeners: {
click: function(button) {
var i = 0;
}
}
}]
}]
}
}]





Any help/hints would be greatly appreciated.

Thanks