Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / examples / toolbar / toolbar-menu-overflow.js
1 Ext.require(['*']);
2 var buttons = [{
3     xtype: 'tbtext',
4     text : 'Text'
5 },  {
6     xtype: 'tbseparator'
7 }];
8 for (var i = 0; i < 20; i++) {
9     buttons.push({
10         text: 'Button ' + (i + 1),
11         handler: function(b) {
12             Ext.Msg.alert('Click', 'You clicked ' + b.text);
13         }
14     })
15 }
16
17 Ext.onReady(function() {
18     Ext.create('Ext.toolbar.Toolbar', {
19         renderTo: Ext.getBody(),
20         width : 600,
21         layout: {
22             overflowHandler: 'Menu'
23         },
24         items: buttons
25     });
26 });