PDA

View Full Version : Message Box ShowAt?



loveforvdubs
18 Oct 2010, 5:36 AM
Is there a way to do show at with an Ext messagebox?

plalx
18 Oct 2010, 6:10 AM
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.



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
}
});

loveforvdubs
18 Oct 2010, 6:16 AM
Awesome! Thank you!