View Full Version : Change location of MessageBox?
jpaulus
20 Sep 2007, 9:17 AM
How can I change the location of a messagebox? If I do:
var mb = Ext.MessageBox.show({...
..can I use mb to somehow get to setXY(xy)? I've tried Ext.get, Ext.fly etc. but I can't seem to get access to the setXY function.
Animal
20 Sep 2007, 12:25 PM
After the first time a MessageBox has been shown, it will have created the single BasicDialog instance that it uses to show messages. So then you can access it like this:
var messageDialog = Ext.DialogManager.get("x-msg-box");
jpaulus
20 Sep 2007, 3:16 PM
Animal,
Thanks, that's useful to know.
Now how can I force the move with setXY() since messageDialog.setXY() squawks? There's some referencing mojo I'm missing.
Thanks!
jpaulus
20 Sep 2007, 4:49 PM
Actually, never mind as I've replaced the message box with a regular div for this purpose and it works fine.
Thanks for your help!
Animal
21 Sep 2007, 12:17 AM
Animal,
Thanks, that's useful to know.
Now how can I force the move with setXY() since messageDialog.setXY() squawks? There's some referencing mojo I'm missing.
Thanks!
setXY??? Since when does BasicDialog have a setXY method?
Here, find the method you need:
http://extjs.com/deploy/ext/docs/output/Ext.BasicDialog.html
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.