In Ext message box we used to provide variables for buttons like Ext.Msg.Button
icon. Is it possible to do the same in our Ext MVC Model of Application?
Yes, this is possible by including a resource in your project and then providing the mapping to that icon (how you do this depends upon the architecture of your application); reading the documentation will help you discern how to do that: both the documentation example and then digging a bit into the icon
config.:
Path to image for an icon.
That's all that Ext.Message.Help
is: a path.
The Ext.button.Button
also has the icon
configuration, just follow the example in the Ext.window.MessageBox documentation linked above.
Here's the code from the doc.s:
Ext.Msg.show({
title:'Save Changes?',
message: 'You are closing a tab that has unsaved changes. Would you like to save your changes?',
buttons: Ext.Msg.YESNOCANCEL,
icon: Path.to.icon // Here, supply the resource path
// ....
});
You can also do in-line configuration of buttons through Ext JS if wanting to take advantage of the Ext.Msg.show({});
functionality.