How to apply loadMask to only one element, and not the whole browser width-height?
default
here, only one element is masked, and a messageBox is in center, inside this element and not the whole display…
any ideas?
EDIT:
@Molecule , thanks, but this is when data is loading from some source, what i need is :
{
xtype:"button",
text:"Alert",
handler: function(){
Ext.Msg.show({
title:'Save Changes?',
msg: 'You are closing ?',
buttons: Ext.Msg.YES,
setLoading: // here somehow only mask parent element, and position alertBox...
}
}
Best Solution
Every component has it's own
loadMask
property. You can use it by callingYourComponent.setLoading
. Here is fiddle to illustrate what I'm talking about.Another way is using
new Ext.LoadMask(YourComponent.el, {msg:"Please wait..."});
. You can look at usage in my fiddle.UPDATE
Here is code example which shows how to apply ExtJS4 loadMask and MessageBox to specified Widget
And here is try-it-yourself example.