[CLOSED] Center windown on screen, not absolute

  1. #1

    [CLOSED] Center windown on screen, not absolute

    Hi,

    I have a webform that is big enouth to scroll the page. In this form I have a grid with many items. Each item can be edited in a Window control.
    The problem is that the window shows centered in the page not in the screen.

    How can I solve this problem?
    Last edited by Daniil; Aug 26, 2010 at 6:09 AM. Reason: [CLOSED]
  2. #2
    Hello!

    As I can know a window is showed centered in a screen (not in a page). But anything is possible. We always can set a window's position by the use of setPosition and setPagePosition methods.


    setPagePosition
    ( Number x, Number y ) : Ext.BoxComponent
    Sets the page XY position of the component. To set the left and top instead, use setPosition. This method fires the move event.
    Parameters:
    • x : NumberThe new x position
    • y : NumberThe new y position

    Returns:
    • Ext.BoxComponentthis

    setPosition
    ( Number left, Number top ) : Ext.BoxComponent
    Sets the left and top of the component. To set the page XY position instead, use setPagePosition. This method fires the move event.Parameters:
    • left : NumberThe new left
    • top : NumberThe new top

    Returns:
    • Ext.BoxComponentthis
  3. #3
    Daniil,

    I used the center() method and it worked the way I wanted.
    EXAMPLE:
    myWindow.center();
    Thanks for your help.
    Last edited by Daniil; Dec 28, 2011 at 4:16 AM. Reason: Please use [CODE] tags

Similar Threads

  1. Replies: 2
    Last Post: Jun 23, 2012, 2:17 PM
  2. Replies: 5
    Last Post: Nov 14, 2011, 9:28 AM
  3. Windows always on the center of screen
    By reiben in forum 1.x Help
    Replies: 1
    Last Post: Dec 09, 2010, 11:56 AM
  4. [CLOSED] Problem with Absolute Layout in IE
    By macap in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 09, 2010, 7:51 AM
  5. [CLOSED] Absolute layout
    By Jean-Pierre Poulin in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 01, 2010, 4:26 PM

Tags for this Thread

Posting Permissions