PDA

View Full Version : Button's menuAlign syntax



neurodon
30 Apr 2012, 7:54 AM
I'm trying to figure out how to align a menu above a toolbar button. My toolbar is at the bottom of the screen, so it needs to pop up. Here is a screenshot of the desired effect:

34697

I've been playing with menuAlign to no avail.. it still is trying to align below the button. What should I do?

neurodon
30 Apr 2012, 8:59 AM
I figured out a way to do it for those interested. It's a hack, but it works. Simply add doLayout() to the menus afterrender event:


{
xtype:'toolbar',
height:30,
cls:'editdashtlbr',
items: ['->',{
cls:'dashlayout',
iconCls: 'icon_layout',
menu: {
items: [{
iconCls:'icon_column1',
text:"1 Column"
},{
iconCls:'icon_column2',
text:"2 Columns"
},{
iconCls:'icon_column3',
text:"3 Columns"
}],
listeners: {
afterrender: function(me) {me.doLayout();}
}
}
}