Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ** MyWindow ** the one that gets rendered fixed outside the viewport. When constrain=true, it is overlayed over the viewport, but the window is not draggable.
- Ext.define('MyApp.view.MyWindow', {
- extend: 'Ext.window.Window',
- height: 185,
- width: 334,
- layout: {
- type: 'absolute'
- },
- title: 'My Window',
- initComponent: function() {
- var me = this;
- Ext.applyIf(me, {
- items: [
- {
- xtype: 'textfield',
- x: 20,
- y: 20,
- itemId: 'edName',
- width: 280,
- fieldLabel: 'Name'
- },
- {
- xtype: 'textfield',
- x: 20,
- y: 50,
- itemId: 'edAddress',
- width: 280,
- fieldLabel: 'Address'
- },
- {
- xtype: 'button',
- anchor: 'right',
- x: 280,
- y: 120,
- itemId: 'btnOK',
- text: 'OK',
- listeners: {
- click: {
- fn: me.onBtnOKClick,
- scope: me
- }
- }
- },
- {
- xtype: 'button',
- x: 220,
- y: 120,
- itemId: 'btnCancel',
- text: 'Cancel',
- listeners: {
- click: {
- fn: me.onBtnCancelClick,
- scope: me
- }
- }
- }
- ]
- });
- me.callParent(arguments);
- },
- onBtnOKClick: function(button, e, eOpts) {
- //var name = edName.Text;
- //alert("Hello, "+name);
- },
- onBtnCancelClick: function(button, e, eOpts) {
- this.close();
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement