I have a very 'long' screen and apparently when I am using the Ext JS 3.3.1 messagebox, it goes all the way to the bottom and removed everything in the background.
This is some example code:
Ext.Msg.show({
title:'[SOME TITLE]',
msg: '[SOME MESSAGE]',
buttons: Ext.Msg.YESNO,
fn: function (btn){
if(btn=='yes'){
//Do something
}
}
},
icon: Ext.Msg.QUESTION}
);
So you want to set only the Y position of your MessageBox? Do this:
var msg=Ext.Msg.show({
title:'[SOME TITLE]',
msg: '[SOME MESSAGE]',
buttons: Ext.Msg.YESNO,
fn: function (btn){
if(btn=='yes'){
//Do something
}
}
});
msg.getDialog().getPositionEl().setTop(50); //this is enough for Y position only
Using setPosition do this:
msg.getDialog().setPosition(undefined,50)
I used 50 pixels in this example because that's near the top. You can set it to something else from the top.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With