PDA

View Full Version : Window Static Position



INeedADip
18 Jun 2009, 1:27 PM
I'd like to make one of the windows in my app static. That way the user can scroll the page and have the window in the current viewport.

Has anyone done this before? Is there another way of going about this particular problem?

Animal
18 Jun 2009, 9:55 PM
As suggested by Condor:



var win = new Ext.Window({
title: 'Test',
x: 100,
y: 100,
width: 100,
height: 100
});
win.show();

Ext.EventManager.on(window, 'scroll', function(){
win.setPosition(100, (document.documentElement || document.body).scrollTop + 100);
}, window, {buffer: 50});