Alex Rivera | Logout

Extjs - Toolbar button menu dropdown with submenus. It's possible?

Asked 2011-10-13T11:42:55.003
9

I've already done a toolbar with buttons that have a dropdown menu but I need more submenu levels. It's possible to do that? Example:

  • toolbarbutton ->

    • menu 1 lv 1
    • menu 2 lv 1
    • menu 3 lv 1->
      • submenu 1 lv 2
      • submenu 2 lv 2
    • menu 4 lv 1

and so on...

Edit
Report

1 Answer

17

Have a look at this example! You can achieve using the Ext.menu.Menu class. Here is an Example:

{
    text: 'Main Menu',                      
    menu: {
        xtype: 'menu',                          
        items: [{
                text: 'Menu One',
                iconCls: 'edit'
            }, {
                text: 'Menu Two',
                menu: {
                    xtype: 'menu',
                    items: [{
                        text: 'Next Level'
                    },{
                        text: 'Next Level'                      
                    },{
                        text: 'Next Level'
                    }]
                }
            }, {
                text: 'Menu Three',
                scale: 'small'
            }, {
                text: 'Menu Four',
                scale: 'small'
        }]                          
    }
}
answered 2011-10-13T11:51:58.823

Your Answer