Upgrade to ExtJS 3.0.0 - Released 07/06/2009
[extjs.git] / examples / toolbar / overflow.js
diff --git a/examples/toolbar/overflow.js b/examples/toolbar/overflow.js
new file mode 100644 (file)
index 0000000..740a8ef
--- /dev/null
@@ -0,0 +1,53 @@
+/*!
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.onReady(function(){\r
+\r
+    var handleAction = function(action){\r
+        Ext.example.msg('<b>Action</b>', 'You clicked "'+action+'"');\r
+    };\r
+    \r
+    var p = new Ext.Window({\r
+        title: 'Standard',\r
+        closable: false,\r
+        height:250,\r
+        width: 500,\r
+        bodyStyle: 'padding:10px',\r
+        contentEl: 'content',\r
+        autoScroll: true,\r
+        tbar: [{\r
+            xtype:'splitbutton',\r
+            text: 'Menu Button',\r
+            iconCls: 'add16',\r
+            handler: handleAction.createCallback('Menu Button'),\r
+            menu: [{text: 'Menu Item 1', handler: handleAction.createCallback('Menu Item 1')}]\r
+        },'-',{\r
+            xtype:'splitbutton',\r
+            text: 'Cut',\r
+            iconCls: 'add16',\r
+            handler: handleAction.createCallback('Cut'),\r
+            menu: [{text: 'Cut menu', handler: handleAction.createCallback('Cut menu')}]\r
+        },{\r
+            text: 'Copy',\r
+            iconCls: 'add16',\r
+            handler: handleAction.createCallback('Copy')\r
+        },{\r
+            text: 'Paste',\r
+            iconCls: 'add16',\r
+            menu: [{text: 'Paste menu', handler: handleAction.createCallback('Paste menu')}]\r
+        },'-',{\r
+            text: 'Format',\r
+            iconCls: 'add16',\r
+            handler: handleAction.createCallback('Format')\r
+        },'->',{\r
+            text: 'Right',\r
+            iconCls: 'add16',\r
+            handler: handleAction.createCallback('Right')\r
+        }]\r
+    });\r
+    p.show();\r
+\r
+});
\ No newline at end of file