PDA

View Full Version : [CLOSED] BpxSplitter question



cwolcott
Jun 18, 2016, 7:41 PM
I have several questions about BoxSplitter operations. I have it working just fine in one of my applications, but having an issue with a new application. Here is a simple example:

Why is the BottomPanel not collapsing from top to bottom?



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

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<title>Simple BoxSplitter</title>
</head>
<body>
<ext:ResourceManager runat="server" />
<ext:Window runat="server" Height="400" Width="600">
<LayoutConfig>
<ext:VBoxLayoutConfig Align="Stretch" />
</LayoutConfig>
<Items>
<ext:Panel runat="server" Title="Top Panel" Flex="1" Region="Center">
</ext:Panel>
<ext:BoxSplitter runat="server" Collapsible="true" CollapseTarget="Next" />
<ext:Panel runat="server" Title="Bottom Panel" Height="150" CollapseDirection="Top"
Collapsible="true">
</ext:Panel>
</Items>
</ext:Window>
</body>
</html>

cwolcott
Jun 19, 2016, 1:11 AM
Please close the thread. I had to much caffeine and forgot about BorderLayout and Regions.



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

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<title>Simple BoxSplitter</title>
</head>
<body>
<ext:ResourceManager runat="server" />
<ext:Window runat="server" Height="400" Width="600" Layout="BorderLayout">
<Items>
<ext:Panel runat="server" Title="Top Panel" Flex="1" Region="Center" />
<ext:Panel runat="server" Region="South" Title="Bottom Panel" Height="150" CollapseDirection="Bottom"
Collapsible="true" Split="true" />
</Items>
</ext:Window>
</body>
</html>

fabricio.murta
Jun 19, 2016, 5:18 PM
Hello,

Well, for vbox layout, to get the 'animate down' behavior it would mean running layout updates every animation frame, thus it probably would get too slow. The items positioning in vbox layout are 'absolute' (not relative) so, only after changes, the top panel's bottom is 'flexed' down to the collapsed panel's top.

I'd recommend, in this situation, disabling animations at all (AnimCollapse="False").

A correct collapse animation could be attained if using the Border Layout but seems the boxSplitter has some issues with the layout, as the splitter component was designed to work with h/v box layouts only (http://docs.sencha.com/extjs/4.2.5/#!/api/Ext.resizer.Splitter).

I hope this helps!

fabricio.murta
Jun 19, 2016, 5:19 PM
Hello Chris!

haha glad your response was in accordance with my suggestion! Had the text typed here and just now sent it, didn't realize your own reply!

Closing the thread.