3 <title>The source code</title>
\r
4 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
\r
5 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
\r
7 <body onload="prettyPrint();">
\r
8 <pre class="prettyprint lang-js">Ext.onReady(function(){
\r
10 var handleAction = function(action){
\r
11 Ext.example.msg('<b>Action</b>', 'You clicked "'+action+'"');
\r
14 var p = new Ext.Window({
\r
19 bodyStyle: 'padding:10px',
\r
20 contentEl: 'content',
\r
23 xtype:'splitbutton',
\r
24 text: 'Menu Button',
\r
26 handler: handleAction.createCallback('Menu Button'),
\r
27 menu: [{text: 'Menu Item 1', handler: handleAction.createCallback('Menu Item 1')}]
\r
29 xtype:'splitbutton',
\r
32 handler: handleAction.createCallback('Cut'),
\r
33 menu: [{text: 'Cut menu', handler: handleAction.createCallback('Cut menu')}]
\r
37 handler: handleAction.createCallback('Copy')
\r
41 menu: [{text: 'Paste menu', handler: handleAction.createCallback('Paste menu')}]
\r
45 handler: handleAction.createCallback('Format')
\r
49 handler: handleAction.createCallback('Right')
\r