PDA

View Full Version : Window positioning



JoseBonifacio
21 May 2010, 5:05 AM
Hi,

Im a trying to position a window, but I cant get it done.

Here is the position i need: "right: 250px; bottom: 0; position:absolute; display: block".

How can i set this in extjs?

Thanks

Condor
21 May 2010, 6:17 AM
Do you mean an Ext.Window?

You'll have to calculate left, e.g.

left: Ext.getBody().getViewSize() - 250 - <window width>

JoseBonifacio
21 May 2010, 7:12 AM
:(

No left, right, top, bottom positioning?

Window size may vary when resizing.. i dont think this will give me an absolute position.

Condor
21 May 2010, 8:27 AM
Why would you want to create a window that is fixed to the viewport?
Why not use an Ext.Viewport with a border layout and a width:250 west panel and your panel as the center?

steffenk
21 May 2010, 8:41 AM
new Ext.Window({
width: 400,
height: 300,
title: 'Window'
}).setPosition(100,60).show();

JoseBonifacio
21 May 2010, 8:46 AM
Viewport is too slow, i personally wouldnt use it in a public site

JoseBonifacio
21 May 2010, 8:53 AM
The thing is, i need help making a window like gmail chat, where the window is set at bottom: 0px, layout absolute.

THe window is always stuck at the bottom of the screen. I dont think ext window allows to set this css style. Dont know why...

steffenk
21 May 2010, 9:00 AM
Viewport is too slow, i personally wouldnt use it in a public site

what?

steffenk
21 May 2010, 9:01 AM
The thing is, i need help making a window like gmail chat, where the window is set at bottom: 0px, layout absolute.

THe window is always stuck at the bottom of the screen. I dont think ext window allows to set this css style. Dont know why...

it's called "Panel" and you can do that.

JoseBonifacio
21 May 2010, 9:55 AM
Panel doesnt have a close button, do you know how i could add one?

steffenk
21 May 2010, 9:59 AM
tools: {id: 'close'}
But you have to do the closing by yourself.
http://www.extjs.com/deploy/dev/docs/?class=Ext.Panel&member=tools

JoseBonifacio
21 May 2010, 11:26 AM
Thanks!! that is what I was looking for all the time

Animal
21 May 2010, 12:51 PM
Viewport is too slow, i personally wouldnt use it in a public site

Absurd. Random.