Results 1 to 2 of 2

Thread: Window Static Position

  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    194

    Default Window Static Position

    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?

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    As suggested by Condor:

    Code:
    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});

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •