PDA

View Full Version : How to remove the cross button from the Ext.Message box across the application.



er.viveksharma
6 Apr 2012, 9:31 AM
Hi there,
I am kinda new to Ext. I am a part of a huge project where in MessageBoxes have been generously used all through the application and has a cross button attached to it. So they are more often used to display the confirmation messages which have an OK button. On the click of the OK button we go ahead and reload the page but if the user clicks on the cross or the esc. key the page remains there. So I need to remove the cross across the whole application. I tried overriding the Ext.window.MessageBox with closeable property as false, but started getting some stange errors. Please help. The version that I am using is 4.0.7. Thanks in advance.

scottmartin
6 Apr 2012, 9:55 AM
What kind of errors are you receiving? Does this work?



Ext.Msg.show({
title:'Click OK',
msg: 'THIS IS A MESSAGE',
closable: false,
buttons: Ext.Msg.YES
});


Regards,
Scott.

er.viveksharma
6 Apr 2012, 10:01 AM
Thanks for the quick reply, really appreciate it. The only problem being I was to do that application wide and not case per case basis so I am looking for a code snippet that can actually change the behavior of all the message boxes across the application. Something like the overrides.