-
30 Apr 2012 7:54 AM #1
Answered: Button's menuAlign syntax
Answered: Button's menuAlign syntax
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:
bottommenu.png
I've been playing with menuAlign to no avail.. it still is trying to align below the button. What should I do?
-
Best Answer Posted by neurodon
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:
Code:{ 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();} } } }
-
30 Apr 2012 8:59 AM #2
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:
Code:{ 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();} } } }


Reply With Quote