Upgrade to ExtJS 3.2.2 - Released 06/02/2010
[extjs.git] / examples / toolbar / overflow.js
1 /*!
2  * Ext JS Library 3.2.2
3  * Copyright(c) 2006-2010 Ext JS, Inc.
4  * licensing@extjs.com
5  * http://www.extjs.com/license
6  */
7 Ext.onReady(function(){
8
9     var handleAction = function(action){
10         Ext.example.msg('<b>Action</b>', 'You clicked "'+action+'"');
11     };
12     
13     var p = new Ext.Window({
14         title: 'Standard',
15         closable: false,
16         height:250,
17         width: 500,
18         bodyStyle: 'padding:10px',
19         contentEl: 'content',
20         autoScroll: true,
21         tbar: new Ext.Toolbar({
22             enableOverflow: true,
23             items: [{
24                 xtype:'splitbutton',
25                 text: 'Menu Button',
26                 iconCls: 'add16',
27                 handler: handleAction.createCallback('Menu Button'),
28                 menu: [{text: 'Menu Item 1', handler: handleAction.createCallback('Menu Item 1')}]
29             },'-',{
30                 xtype:'splitbutton',
31                 text: 'Cut',
32                 iconCls: 'add16',
33                 handler: handleAction.createCallback('Cut'),
34                 menu: [{text: 'Cut menu', handler: handleAction.createCallback('Cut menu')}]
35             },{
36                 text: 'Copy',
37                 iconCls: 'add16',
38                 handler: handleAction.createCallback('Copy')
39             },{
40                 text: 'Paste',
41                 iconCls: 'add16',
42                 menu: [{text: 'Paste menu', handler: handleAction.createCallback('Paste menu')}]
43             },'-',{
44                 text: 'Format',
45                 iconCls: 'add16',
46                 handler: handleAction.createCallback('Format')
47             },'->',{
48                 text: 'Right',
49                 iconCls: 'add16',
50                 handler: handleAction.createCallback('Right')
51             }]
52         })
53     });
54     p.show();
55
56 });