Results 1 to 3 of 3

Thread: popup window not appearing in the center of page

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    35
    Vote Rating
    0
      0  

    Default Answered: popup window not appearing in the center of page

    Hi,

    I have a popup window as described below. This window is not appearing on the center of page when I try to open it on a button click.

    code for button click
    Code:
    myapp.views.appEmpfehlenPopup.showBy(btn);
    and appEmpfehlenPopup.js
    Code:
    myapp.views.appEmpfehlenPopup = new Ext.Panel({
         floating: true,
         centered: true,
         modal: true,
         width: 500,
         height: 200,
         border:0,
         styleHtmlContent: true,
         items:[
         {   xtype:'box',
             html:loadURL('app/views/facebookbutton.html')
                     },
            { 
             html:loadURL('app/views/twitter.html')
            }
            
           ],
         dockedItems: [{
           xtype: 'toolbar',
           cls:'welcometoolbar',
             title: 'Weitersagen über:',
              items: []
                }]
              });

  2. You are showing it via the showBy method which will align it to what you pass it. To show it centered, have centered : true and just use show()

  3. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,070
    Answers
    3976
    Vote Rating
    1394
      0  

    Default

    You are showing it via the showBy method which will align it to what you pass it. To show it centered, have centered : true and just use show()
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    35
    Vote Rating
    0
      0  

    Default

    Thanks that worked!

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
  •