insanity
insanity

Reputation: 1178

Toolbar in Ext Js 4

I am new to Ext Js. I am trying to create menu button and split button in the toolbar. here is my code

Ext.onReady(function(){
    new Ext.Toolbar({
        renderTo: document.body,
        items: [{
            xtype: 'tbbutton',
            text: 'Button'
        },{
            xtype: 'tbbutton',
            text: 'Menu Button',
            menu: [{
                text: 'Better'
            },{
                text: 'Good'
            },{
                text: 'Best'
            }]
        },{
            xtype: 'tbsplit',
            text: 'Split Button',
            menu: [{
                text: 'Item One'
            },{
                text: 'Item Two'
            },{
                text: 'Item Three'
            }]
        }]
    });
});

when i am running the above code in ext-4.2.1.883 package, it is not showing the required toolbar. please help

Upvotes: 0

Views: 456

Answers (1)

matt
matt

Reputation: 4047

You're using the wrong xtypes, use:

Upvotes: 1

Related Questions