PDA

View Full Version : inner popup window not shown properly on desktop



rushi2440
19 Mar 2012, 4:23 AM
hi.. sencha forum member

I am having one problem with showing the popup window. I had a window which popup and it shows above the parent screen. Below is the view
32887

as the window goes above the parent screen I am not able to close the window popup.

below is the code for the window which popup.


Ext.define('rms.view.companymgt.companyAdd',{
extend: 'Ext.window.Window',
alias: 'widget.companyadd',
id: 'companyadd',
height: 489,
width: 742,
//maximizable: true,
//minimizable: true,
resizable: false,
layout: {
type: 'border'
},
title: 'My Window',
modal: true,


initComponent: function() {
var me = this;


Ext.applyIf(me, {
items: [
{
xtype: 'panel',
shadow: true
,
layout: {
type: 'column'
},
preventHeader: true,
title: 'My Panel',
flex: 3,
region: 'center',
items: [
{
xtype: 'fieldset',
height: 400,
margin: '0 0 0 2',
width: 534,
title: 'Company Information',
items: [
{
xtype: 'textfield',
fieldLabel: 'Company Name',
labelWidth: 110,
anchor: '100%'
},
{
xtype: 'textfield',
fieldLabel: 'Company Title',
labelWidth: 110,
anchor: '100%'
},
{
xtype: 'textfield',
fieldLabel: 'Contact No',
labelWidth: 110,
anchor: '100%'
},
{
xtype: 'textfield',
fieldLabel: 'Fax No',
labelWidth: 110,
anchor: '100%'
},
{
xtype: 'textfield',
fieldLabel: 'Country',
labelWidth: 110,
anchor: '100%'
},
{
xtype: 'textfield',
fieldLabel: 'State',
labelWidth: 110,
anchor: '100%'
},
{
xtype: 'textfield',
fieldLabel: 'City',
labelWidth: 110,
anchor: '100%'
},
{
xtype: 'textfield',
fieldLabel: 'Website',
labelWidth: 110,
anchor: '100%'
},
{
xtype: 'textfield',
fieldLabel: 'Email Contact',
labelWidth: 110,
anchor: '100%'
},
{
xtype: 'textareafield',
height: 98,
fieldLabel: 'Address',
labelWidth: 110,
anchor: '100%'
}
]
},
{
xtype: 'fieldset',
height: 400,
margin: '0 0 0 5',
width: 187,
title: 'Company Logo',
items: [
{
xtype: 'image',
height: 186,
width: 139,
src: 'http://www.sencha.com/img/sencha-large.png'
},
{
xtype: 'button',
width: 75,
text: 'Upload Image'
},
{
xtype: 'button',
text: 'Delete Image'
}
]
}
]
}
],
dockedItems: [
{
xtype: 'toolbar',
width: 150,
region: 'east',
dock: 'bottom',
items: [
{
xtype: 'tbspacer',
height: 21,
width: 254
},
{
xtype: 'button',
height: 42,
width: 56,
text: 'Save'
},
{
xtype: 'tbseparator'
},
{
xtype: 'button',
height: 42,
width: 56,
text: 'Cancel',
handler: function(btn){
btn.up('window').destroy();
}
}
]
}
]
});


me.callParent(arguments);
}
});


Yogendra Singh
Sr. Programmer
Kintudesigns.com

mitchellsimoens
19 Mar 2012, 11:42 AM
Constrain the window so that it cannot go outside the viewport.