View Full Version : How to position a window at the center of the screen?

2 Jan 2012, 10:04 PM
Hi All,

I want to show popup window at the center of the screen.

what should i give for x and y ?

LabDetailsWindow = Ext.create('Ext.window.Window',
title : "Lab Details",
autoScroll : true,
draggable : false,
x : 100,
y : 100,
//plain : true,
items : [LabDetailsPanel]

2 Jan 2012, 10:10 PM
It should be centered by default if you leave out the x and y.

Make sure you specify a width and height on your window. You'll have layout problems if you don't, especially in older versions of IE.