Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2013
550
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Ext.define('MyApp.view.MyWindow1', {
  2.     extend: 'Ext.window.Window',
  3.  
  4.     height: 250,
  5.     width: 400,
  6.     layout: {
  7.         type: 'absolute'
  8.     },
  9.     title: 'My Window',
  10.  
  11.     initComponent: function() {
  12.         var me = this;
  13.  
  14.         Ext.applyIf(me, {
  15.             items: [
  16.                 {
  17.                     xtype: 'button',
  18.                     x: 300,
  19.                     y: 170,
  20.                     text: 'MyButton',
  21.                     listeners: {
  22.                         click: {
  23.                             fn: me.onButtonClick,
  24.                             scope: me
  25.                         }
  26.                     }
  27.                 },
  28.                 {
  29.                     xtype: 'textfield',
  30.                     x: 111,
  31.                     y: 80,
  32.                     fieldLabel: 'Label'
  33.                 }
  34.             ]
  35.         });
  36.  
  37.         me.callParent(arguments);
  38.     },
  39.  
  40.     onButtonClick: function(button, e, eOpts) {
  41.         alert("Foo");
  42.     }
  43.  
  44. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement