PDA

View Full Version : Menu-Panel



tobiu
12 May 2010, 7:11 AM
hi together,

in the ext 2.* times, there was an ux for rendering a menu into a panel, if you want to show it permanently. in ext 3.*, menu was finally changed so that it is a child of container.

so, i thought now you can easily integrate it into other panels without needing ux anymore.

today, i tried out a small testcase without success:



Ext.onReady(function(){

var panel = new Ext.Panel({
title: 'Menu Panel',
width:600,
height:300,
bodyStyle: 'padding:10px;',
renderTo: Ext.getBody(),

items: [
new Ext.menu.Menu({
//,plain : true
items : [{
text : '1'
},{
text : '2'
}]
})
]
});
});


so, my question is: is it generally possible to use menues this way or do we need to convert the menuPanel-ux for ext3?


thanks and kind regards,
tobiu

tobiu
12 May 2010, 7:21 AM
ok, just missed the config


floating: false


issue solved ;)

Animal
12 May 2010, 7:21 AM
A Menu floats by default.

To use it as a child Component in a layout, configure it floating: false

tobiu
13 May 2010, 1:24 AM
hi nige,

we answered simultaneously =)
thanks, i am glad that it is quite easy to use now.

kind regards,
tobiu