3 * Copyright(c) 2006-2010 Ext JS, LLC
5 * http://www.extjs.com/license
7 Ext.onReady(function(){
\r
9 var handleAction = function(action){
\r
10 Ext.example.msg('<b>Action</b>', 'You clicked "'+action+'"');
\r
13 var p = new Ext.Window({
\r
18 bodyStyle: 'padding:10px',
\r
19 contentEl: 'content',
\r
21 tbar: new Ext.Toolbar({
\r
22 enableOverflow: true,
\r
24 xtype:'splitbutton',
\r
25 text: 'Menu Button',
\r
27 handler: handleAction.createCallback('Menu Button'),
\r
28 menu: [{text: 'Menu Item 1', handler: handleAction.createCallback('Menu Item 1')}]
\r
30 xtype:'splitbutton',
\r
33 handler: handleAction.createCallback('Cut'),
\r
34 menu: [{text: 'Cut menu', handler: handleAction.createCallback('Cut menu')}]
\r
38 handler: handleAction.createCallback('Copy')
\r
42 menu: [{text: 'Paste menu', handler: handleAction.createCallback('Paste menu')}]
\r
46 handler: handleAction.createCallback('Format')
\r
50 handler: handleAction.createCallback('Right')
\r