Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    109
    Vote Rating
    1
    Notepad123 is an unknown quantity at this point

      0  

    Default Container not showing in MessageBox

    Container not showing in MessageBox


    When I try to put Ext.Panel inside items of Ext.MessageBox it isn't shown.
    But if I put a button it is shown.
    Shouldn't I be able to put any container inside items property and expect it to show as a general rule?

    Code:
    Ext.setup({    
      onReady        : function() {
        
        var toolbar = Ext.create('Ext.Toolbar', {
          dock       : 'top',
          title      : 'Standard Titlebar'
        });
        
        var green = Ext.create('Ext.Panel', {
          layout     : 'auto',
          style      : "background-color: Green",
          html       : "Green",
          height: '100px'
        });
        
        //CREATE BUTTON.
        var button1 = { 
          xtype      :'button', 
          text       :'Button 1' 
        };
        
        
        var message = Ext.create('Ext.MessageBox', 
            {
                title: 'Validation',
                message: 'Please wait',
                buttons: [],
                items: [button1, green]
            }        
        );        
               
        Ext.create('Ext.Panel', {
          fullscreen : true,
          layout     : 'auto',
          scrollable : true,
          items      : [toolbar, green]
        });
        
        message.show();
        
      }
    
    
    });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Ext.MessageBox isn't meant to hold items, it's meant to show a title, message and buttons.

    if you want a floating container, create a container with centered set to true.

    Also, auto is the default layout so you don't have to set layout : 'auto'
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

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

Thread Participants: 1