Results 1 to 6 of 6

Thread: MessageBox problem, see image?

  1. #1
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    125
    Answers
    1
    Vote Rating
    1
      0  

    Question Answered: MessageBox problem, see image?

    Hello,

    I'm just started with Ext Js, now I create an App and show a simple message in a box but the message isn't visible and the layout of the message box is strange.
    strange messagebox.jpg

    Anybody know to how to fix?

    Thanks!

  2. I do not know how your code is setup .. this should work:

    Code:
    Ext.create('Ext.container.Viewport', {
        layout: 'border',
        items: [{
            region: 'north',
            html: '<h1 class="x-panel-header">Page Title</h1>',
            border: false,
            margins: '0 0 5 0'
        }, {
            region: 'west',
            collapsible: true,
            title: 'Navigation',
            width: 150
        }, {
            region: 'center',
            xtype: 'tabpanel', // TabPanel itself has no title
            activeTab: 0,      // First tab active by default
            items: {
                title: 'Default Tab',
                html: 'The first tab\'s content. Others may be added dynamically'
            },
            listeners: {
                boxready: function() {
                    Ext.MessageBox.alert('Status', 'Changes saved successfully.');
                }
            }
        }]
    });?
    Scott.

  3. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,409
    Answers
    716
    Vote Rating
    504
      0  

    Default

    How and when are you calling this MessageBox. There is obviously a mistake in your code, but we have no way of checking.

    Scott.

  4. #3
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    125
    Answers
    1
    Vote Rating
    1
      0  

    Default Show event

    Hello,

    Thank you for the reply, I want to show the messagebox on the panel show event.

    PHP Code:
    onPanelShow: function(abstractcomponentoptions) {
         
    Ext.MessageBox.alert('Status''Changes saved successfully.');

    Thanks!

  5. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,409
    Answers
    716
    Vote Rating
    504
      0  

    Default

    It would be much better to load a notification window (non halting). Please see the following:
    http://www.sencha.com/forum/showthread.php?145503

    I would also use boxReady event instead of show.

    Scott.

  6. #5
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    125
    Answers
    1
    Vote Rating
    1
      0  

    Default

    I looks nice but I need a blocking messagebox. I'ts strange that it isn't showing up.
    Anybody knows the trick?

    Thanks

  7. #6
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,409
    Answers
    716
    Vote Rating
    504
      0  

    Default

    I do not know how your code is setup .. this should work:

    Code:
    Ext.create('Ext.container.Viewport', {
        layout: 'border',
        items: [{
            region: 'north',
            html: '<h1 class="x-panel-header">Page Title</h1>',
            border: false,
            margins: '0 0 5 0'
        }, {
            region: 'west',
            collapsible: true,
            title: 'Navigation',
            width: 150
        }, {
            region: 'center',
            xtype: 'tabpanel', // TabPanel itself has no title
            activeTab: 0,      // First tab active by default
            items: {
                title: 'Default Tab',
                html: 'The first tab\'s content. Others may be added dynamically'
            },
            listeners: {
                boxready: function() {
                    Ext.MessageBox.alert('Status', 'Changes saved successfully.');
                }
            }
        }]
    });?
    Scott.

Posting Permissions

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