PDA

View Full Version : [CLOSED] Loading Display



adelaney
Jun 17, 2012, 3:06 AM
I have an application where I am doing some screen manipulation outside of Ext, but even though I am using my own script is there a way for me to show/hide the Ext "loading" graphic as I need it just so that it is visually consistet with the rest of the application?

Daniil
Jun 17, 2012, 7:00 PM
Hi,

Are the Ext.NET resources loaded on that page where you would like Ext.NET masking?

If yes, please use:

Ext.net.Mask.show();

Ext.net.Mask.hide();

If no, then, I am afraid, there is no way without Ext.NET resources. Though, certainly, you could try to winkle out the masking functionality from the Ext.NET resources. I think it might be not so easy.

adelaney
Jun 18, 2012, 1:18 PM
The resources are added and this is almost exactly what I want. The only thing I would like to do more, if possible, is contain the mask to an element on the page instead of having it display "modally." Is that possible? I do have an Ext panel which contains the elements that I am trying to mask. Does that help?

Daniil
Jun 18, 2012, 1:35 PM
Generally, you can mask any appropriate HTML elements.

Example

<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!DOCTYPE>

<html>
<head runat="server">
<title>Ext.NET v2 Example</title>

<style type="text/css">
.my-div {
height: 200px;
width: 200px;
border: 1px solid;
}
</style>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />

<div id="div1" class="my-div"></div>

<b>Approach 1</b><br/>
<ext:Button runat="server" Text="Mask">
<Listeners>
<Click Handler="Ext.net.Mask.show({
el : Ext.get('div1'),
msg : 'My Mask Message'
});" />
</Listeners>
</ext:Button>

<ext:Button runat="server" Text="Unmask">
<Listeners>
<Click Handler="Ext.net.Mask.hide();" />
</Listeners>
</ext:Button>

<b>Approach 2</b><br/>
<ext:Button runat="server" Text="Mask">
<Listeners>
<Click Handler="Ext.get('div1').mask('My Mask Message', 'x-mask-loading');" />
</Listeners>
</ext:Button>

<ext:Button runat="server" Text="Unmask">
<Listeners>
<Click Handler="Ext.get('div1').unmask();" />
</Listeners>
</ext:Button>
</form>
</body>
</html>

adelaney
Jun 18, 2012, 2:07 PM
That's exactly what I wanted. Thanks.