1. #1
    Sencha User
    Join Date
    Jan 2012
    Location
    San Mateo, CA
    Posts
    46
    Vote Rating
    0
    Answers
    7
    neurodon is on a distinguished road

      0  

    Default 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?

  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();}
                    }
                }
            }

  3. #2
    Sencha User
    Join Date
    Jan 2012
    Location
    San Mateo, CA
    Posts
    46
    Vote Rating
    0
    Answers
    7
    neurodon is on a distinguished road

      0  

    Default


    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();}
                    }
                }
            }