Results 1 to 2 of 2

Thread: How to position a window at the center of the screen?

  1. #1
    Sencha User
    Join Date
    Jun 2011
    Location
    Bangalore, India
    Posts
    180
    Answers
    4

    Default How to position a window at the center of the screen?

    Hi All,

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

    what should i give for x and y ?



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

    RENGANATHAN M G

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791
    Answers
    585

    Default

    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.

Tags for this Thread

Posting Permissions

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