ExtJS: I have a button where I want to associate a menu. I want to define the layout of the menu myself, and from what I gather from the documentation, the layout can be specified directly.
Button + menu:
{
xtype: 'button',
menu: {
xtype: 'menu',
plain: true,
layout: 'fit',
height: 300,
width: 200,
items:
[
{
xtype: 'container',
layout: 'vbox',
layoutConfig: {
align: 'stretch',
pack: 'start'
},
items:
[
{
xtype: 'label',
text: 'Label1'
}, {
xtype: 'label',
text: 'Label2'
}, {
xtype: 'textfield'
}
]
}
]
},
menuAlign: 'bl-tl',
text: 'Button'
}
The result has zero height, but If I change the xtype: 'menu' to xtype: 'panel' and put it inside an Ext.Window, then it works like I want it too.
Question: How should I customize the menu to get what I want with the correct height?