Wednesday, November 11, 2015

Button



Ext.application({


controllers:['LoginController','Posts'],
views: ['Login','Post'],
models:['Loginm','postm'],
name : 'ExtJSWebSpring',
    launch: function() {
    Ext.create('Ext.Button', {
       text      : 'Menu button',
       renderTo  : Ext.getBody(),
       arrowAlign: 'bottom',
       menu      : [
           {text: 'Item 1'},
           {text: 'Item 2'},
           {text: 'Item 3'},
           {text: 'Item 4'}
       ]
    });
    Ext.create('Ext.Button', {
       renderTo: document.body,
       text    : 'Click me',
       scale   : 'large'
    });
   
    Ext.create('Ext.Container', {
       renderTo: Ext.getBody(),
       items   : [
           {
               xtype: 'button',
               text : 'My Button'
           }
       ]
    });
   
    Ext.create('Ext.Button', {
       text: 'Click me',
       renderTo: Ext.getBody(),
       handler: function() {
           alert('You clicked the button!');
       }
    });
    }
});

No comments:

Post a Comment