Jan 22, 2015, 5:23 PM
Layout row not expanding after collapsing fixed height row
Hello,
I have a RowLayout with some fixed height rows, which contain a collapsable panel (FormGroup="true"), and the last one taking all the remaining space. When any of those panels is collapsed, the last row moves up instead of resizing to occupy all the space. Here is a small example to reproduce this:
Thanks and regards,
Andrew
I have a RowLayout with some fixed height rows, which contain a collapsable panel (FormGroup="true"), and the last one taking all the remaining space. When any of those panels is collapsed, the last row moves up instead of resizing to occupy all the space. Here is a small example to reproduce this:
<%@ 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 id="Head1" runat="server">
<title>Row resize problem</title>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<h1>Row resize problem</h1>
<ext:Panel runat="server" Height="300" Title="Parent Panel" Frame="true" Layout="Fit">
<Items>
<ext:RowLayout runat="server">
<Rows>
<ext:LayoutRow>
<ext:Panel runat="server" Padding="5" Title="Collapsable Child Panel" FormGroup="true" Height="100">
<Items>
<ext:TextField runat="server" Text="Text 1" />
<ext:Button runat="server" Text="Button 1" />
</Items>
</ext:Panel>
</ext:LayoutRow>
<ext:LayoutRow RowHeight="1">
<ext:Panel runat="server" Padding="5" Title="Child panel that should fill the Parent Panel" Frame="true">
<Items>
<ext:TextField runat="server" Text="Text 2" />
<ext:Button runat="server" Text="Button 2" />
</Items>
</ext:Panel>
</ext:LayoutRow>
<ext:LayoutRow RowHeight="0.001">
<ext:Label runat="server" Text="OOPS! This shouldn't be seen!" />
</ext:LayoutRow>
</Rows>
</ext:RowLayout>
</Items>
</ext:Panel>
</body>
</html>
Is this behavior possible with a RowLayout? Or must I use a Border layout instead? Right now the code is using the panels' BeforeCollapse and BeforeExpand direct events to manually calculate and set the height of the last panel, but I thought there must be an easier way to do this.Thanks and regards,
Andrew
Last edited by ALobpreis; Jan 22, 2015 at 5:26 PM.