Results 1 to 3 of 3

Thread: Message Box ShowAt?

  1. #1

    Default Message Box ShowAt?

    Is there a way to do show at with an Ext messagebox?

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

    Default

    The functionality is not directly supported by Ext.MessageBox, but I created an override for you that shows how you could manage to do it.

    Code:
     
      Ext.MessageBox.show = Ext.MessageBox.show.createInterceptor(
       function(config) {
        var pos = config.showAt;
        if (pos)
         this.on({
          'beforeshow': function() {
           this.setPosition(pos.x, pos.y);
          },
          single: true
         });
       },
       Ext.MessageBox.getDialog()
      );
     
      Ext.MessageBox.show({
       msg: 'test',
       showAt: {
        x: 10,
        y: 30
       }
      });
    Last edited by plalx; 18 Oct 2010 at 6:17 AM. Reason: Modified the code...

  3. #3

    Default

    Awesome! Thank you!

Similar Threads

  1. Two message box ,why not show the first confirm box?
    By quetinxu in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 24 Aug 2010, 10:57 PM
  2. display JSON response Message text in Message box
    By bryanevil in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 11 Jul 2010, 9:44 PM
  3. Need Help with Message.box
    By noise in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 30 Nov 2008, 11:19 AM
  4. showing dynamic message in message box
    By misra123 in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 23 Aug 2008, 4:36 AM
  5. help in Message Box
    By sathishs in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 2 Jun 2008, 11:38 PM

Posting Permissions

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