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