Results 1 to 3 of 3

Thread: Applying config options to Ext.MessageBox.show ?

  1. #1
    Sencha User
    Join Date
    Jul 2010
    Posts
    119

    Default Applying config options to Ext.MessageBox.show ?

    Hi!

    I'm trying to apply config. options to these, but failing.

    I've tried:

    PHP Code:
     Ext.apply(Ext.MessageBox.prototype, {
     
      
    animElExt.getBody()
     
     });
     
     
    Ext.apply(Ext.MessageBox.show.prototype, {
     
      
    animElExt.getBody()
     
     });
     
     
    Ext.apply(Ext.Msg.show.prototype, {
     
      
    animElExt.getBody()
     
     });
     
     
    Ext.apply(Ext.Msg.prototype, {
     
      
    animElExt.getBody()
     
     });
     
    Ext.Msg.animEl Ext.getBody(); 
    None of this work. Any ideas ?

    Thx!

  2. #2
    Sencha User
    Join Date
    Aug 2009
    Posts
    480

    Default

    Yes, you can create an interceptor to do this. The following code will wrap the show function in another function that will make sure that animEl is the body, if no animEl config was passed.

    Code:
    Ext.MessageBox.show = Ext.MessageBox.show.createInterceptor(function(config) {
      Ext.applyIf(config, { animEl: Ext.getBody() });
     });

  3. #3
    Sencha User
    Join Date
    Jul 2010
    Posts
    119

    Default

    That does work, but the messagebox appears in the lower right corner ... ?

    If I pass the animEl: Ext.getBody() each time I use it, it'll display alright though. Thanks alot anyways.

Similar Threads

  1. Get MessageBox.show() config options in callback
    By tristanlee85 in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 28 Jan 2010, 12:48 PM
  2. Ext.Container config options question
    By harley.333 in forum Community Discussion
    Replies: 1
    Last Post: 1 Oct 2008, 8:37 PM
  3. Ext.app.SearchField config options
    By bluesapphire in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 2 Aug 2008, 10:14 AM

Posting Permissions

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