- width:600,
- height:300,
- bodyStyle: 'padding:10px;', // lazy inline style
-
- tbar: [
- action, { // <-- Add the action directly to a toolbar
- text: 'Action Menu',
- menu: [action] // <-- Add the action directly to a menu
- }
- ],
-
- items: [
- new Ext.Button(action) // <-- Add the action as a button
- ],
-
- renderTo: Ext.getBody()
+ renderTo: document.body,
+ width: 600,
+ height: 300,
+ bodyPadding: 10,
+ dockedItems: {
+ itemId: 'toolbar',
+ xtype: 'toolbar',
+ items: [
+ action, // Add the action directly to a toolbar
+ {
+ text: 'Action menu',
+ menu: [action] // Add the action directly to a menu
+ }
+ ]
+ },
+ items: Ext.create('Ext.button.Button', action) // Add the action as a button