Upgrade to ExtJS 3.1.0 - Released 12/16/2009
[extjs.git] / examples / toolbar / overflow.js
1 /*!
2  * Ext JS Library 3.1.0
3  * Copyright(c) 2006-2009 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: [{\r
22             xtype:'splitbutton',\r
23             text: 'Menu Button',\r
24             iconCls: 'add16',\r
25             handler: handleAction.createCallback('Menu Button'),\r
26             menu: [{text: 'Menu Item 1', handler: handleAction.createCallback('Menu Item 1')}]\r
27         },'-',{\r
28             xtype:'splitbutton',\r
29             text: 'Cut',\r
30             iconCls: 'add16',\r
31             handler: handleAction.createCallback('Cut'),\r
32             menu: [{text: 'Cut menu', handler: handleAction.createCallback('Cut menu')}]\r
33         },{\r
34             text: 'Copy',\r
35             iconCls: 'add16',\r
36             handler: handleAction.createCallback('Copy')\r
37         },{\r
38             text: 'Paste',\r
39             iconCls: 'add16',\r
40             menu: [{text: 'Paste menu', handler: handleAction.createCallback('Paste menu')}]\r
41         },'-',{\r
42             text: 'Format',\r
43             iconCls: 'add16',\r
44             handler: handleAction.createCallback('Format')\r
45         },'->',{\r
46             text: 'Right',\r
47             iconCls: 'add16',\r
48             handler: handleAction.createCallback('Right')\r
49         }]\r
50     });\r
51     p.show();\r
52 \r
53 });