Results 1 to 2 of 2

Thread: Container not showing in MessageBox

    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
    141

    Default 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 Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    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 @LikelyMitch

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

    Posts are my own, not any current, past or future employer's.

Posting Permissions

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