1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    35
    Vote Rating
    0
    manoveg is on a distinguished road

      0  

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

    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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,107
    Vote Rating
    453
    Answers
    3157
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      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 @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    35
    Vote Rating
    0
    manoveg is on a distinguished road

      0  

    Default


    Thanks that worked!