PDA

View Full Version : [CLOSED] problem hide window



tactime10
Apr 18, 2012, 10:40 AM
Hi,

I added the window and a gridPanel into a tabPanel. This window is shown when I click on the cell of the gridPanel.
When I click the another tabPanel I call the window.hide(). Now when return on this tabPanel I see the window frame of gray color.

below there is the my code



<ext:Panel ID="panelReportBacklog" runat="server" Border="false" Header="false" Layout="Fit" PaddingSummary="0 0 5 0"/>
<Items>
<ext:Window Id="windowNote" runat="server" Hidden="true"/>
</Items>
<Listeners>
<Deactivate Handler="#{windowNote}.hide();" />
</Listeners>
</ext:Panel>

I attached the screenshots for explain better my situation

Can you help me?
Thanks
41244125

Daniil
Apr 18, 2012, 12:47 PM
Hi,

Please don't place a Window into Panel Items.

You can place in into Panel Bin.

Example

<ext:Panel runat="server">
<Bin>
<ext:Window runat="server" Hidden="true" />
</Bin>
<Listeners>
<Activate Handler="this.bin[0].show();" />
<Deactivate Handler="this.bin[0].hide();" />
</Listeners>
</ext:Panel>

More info about the Bin feature.
http://forums.ext.net/showthread.php?13726&p=57259&viewfull=1#post57259

tactime10
Apr 18, 2012, 4:07 PM
I tried as you suggested but the window is always visible, however I choose to render modal the window so I don't manage this situation

Thank you

Daniil
Apr 18, 2012, 4:11 PM
I was unable to reproduce the problem using the example below. Please provide your one.

Example

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

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ext.NET v2 Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:TabPanel runat="server">
<Items>
<ext:Panel runat="server" Title="Some tab" />
<ext:Panel runat="server" Title="Tab with Window">
<Bin>
<ext:Window runat="server" Hidden="true" />
</Bin>
<Listeners>
<Activate Handler="this.bin[0].show();" />
<Deactivate Handler="this.bin[0].hide();" />
</Listeners>
</ext:Panel>
</Items>
</ext:TabPanel>
</form>
</body>
</html>