[CLOSED] Portal Layout Resize Issues

  1. #1

    [CLOSED] Portal Layout Resize Issues

    Hello
    We are laying out a page using a Portal that contains four Portlets each taking up 25% of the screen. This works well with a combination of HBoxLayout and VBoxLayout.

    We now want to be able to do the following:
    -- Allow the user to resize the Portlets horizontally and vertically in between the Portlets. However, even with the ResizableConfig on a Portlet we seemed to be forced to stay with what the HBoxLayout and VBoxLayout are configured for.
    -- Allow the user to resize the browser and have the last resizing done by the user to stay in place. If this is not possible, at least stick with the layout specified by the HBoxLayout and VBoxLayout.
    One other issue is that regardless of how I configure the page, an unneeded vertical scroll bar appears on the far right.

    These issues seem to occur in every browser type.

    Here is the markup. Any help you can provide would be greatly appreciated. Thank you.

    
    <%@ Page Language="C#"  %>
    <%@ Import Namespace="Ext.Net.Utilities" %>
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    <!DOCTYPE html>
    <html>
    <head id="Head1" runat="server">
        <title></title>
    </head>
    <body>
        <form id="Form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
            <ext:Viewport ID="Viewport1" runat="server" Layout="VBoxLayout">
                <LayoutConfig>
                    <ext:VBoxLayoutConfig Align="Stretch" />
                </LayoutConfig>
                <Items>
                <ext:Panel ID="Panel2" runat="server" Flex="50" Layout="FitLayout" Border="false" Padding="0" >
                    <Items>
                        <ext:Portal ID="ptlA" runat="server" Layout="HBoxLayout">
                            <Items>
                                <ext:PortalColumn ID="PortalColumn1" runat="server" 
                                    Cls="x-column-padding" 
                                    Layout="VBoxLayout"
                                    Flex="1"
                                    ColumnWidth="0.5">
                                    <LayoutConfig>
                                        <ext:VBoxLayoutConfig Align="Stretch" />
                                    </LayoutConfig>
                                    <Items>
                                        <ext:Portlet ID="plt1" runat="server" Title="Portlet 1"
                                            AutoScroll="false"
                                            Layout="FitLayout"
                                            Flex="1">
                                            <ResizableConfig ID="ResizableConfig4" runat="server"
                                                MinHeight="200" 
                                                MinWidth="200" 
                                                Transparent="false" 
                                                Handles="South" />
                                        </ext:Portlet>
                                        <ext:Portlet ID="plt2" runat="server" Title="Portlet 2"
                                            AutoScroll="false" 
                                            Layout="FitLayout" 
                                            Flex="1">
                                            <ResizableConfig ID="ResizableConfig2" runat="server"
                                                MinHeight="200" 
                                                MinWidth="200" 
                                                Transparent="false" 
                                                Handles="South" />
                                        </ext:Portlet>
                                    </Items>
                                </ext:PortalColumn>
                                <ext:PortalColumn ID="PortalColumn2" runat="server"
                                    Cls="x-column-padding1"
                                    Layout="VBoxLayout"
                                    Flex="1"
                                    ColumnWidth="0.5">
                                    <LayoutConfig>
                                        <ext:VBoxLayoutConfig Align="Stretch" />
                                    </LayoutConfig>
                                    <Items>
                                        <ext:Portlet ID="plt3" runat="server" Title="Portlet 3"
                                            AutoScroll="false" 
                                            Layout="FitLayout"
                                            Flex="1">
                                            <ResizableConfig ID="ResizableConfig3" runat="server"
                                                MinHeight="200" 
                                                MinWidth="200" 
                                                Transparent="false" 
                                                Handles="South" />
                                        </ext:Portlet>
                                        <ext:Portlet ID="plt4" runat="server" Title="Portlet 4"
                                            AutoScroll="false" 
                                            Layout="FitLayout" 
                                            Flex="1">
                                            <ResizableConfig ID="ResizableConfig1" runat="server"
                                                MinHeight="200" 
                                                MinWidth="200" 
                                                Transparent="false" 
                                                Handles="South" />
                                        </ext:Portlet>
                                    </Items>
                                </ext:PortalColumn>
                            </Items>
                        </ext:Portal>
                        </Items>
                    </ext:Panel>
                </Items>
            </ext:Viewport>
        </form>
    </body>
    </html>
    Last edited by Baidaly; Jan 18, 2013 at 2:31 AM. Reason: [CLOSED]
  2. #2
    Hi,

    1. Regarding vertical resizing the PortalColumns.

    The Portal internally uses ColumnLayout and supports that layout only. Unfortunately, you can't just set up HBoxLayout to get it working.

    Here is a related thread.
    http://forums.ext.net/showthread.php...in-ext-net-2-0

    2. Regarding horizontal resizing the Portlets.

    Yes, I think you can use VBoxLayout for the PortalColumns. But for resizing I would suggest to use a BoxSplitter.

    Here is an example how to use a BoxSplitter with HBoxLayout.
    https://examples2.ext.net/#/Layout/HBoxLayout/Split/

    It will look the same with VBoxLayout.

    3. Regarding the vertical scrollbar.

    I think setting up
    Flex="1"
    for the PortalColumns causes that scrollbar.

    Unfortunately, as I already mentioned, Portal uses ColumnLayout and it doesn't support the Flex option. So, a result is unpredictable. You should set up explicit Height for the PortalColumns or it will stretched according to the Portlets height.


    Personally, I would give up the Portal and implement my own using HBox/VBox layouts combination as you did. Then you could look into the Portal sources to investigate how to implement the drag@drop functionality. Generally, Portal and Portlets are just Panels with some additional functionality.
  3. #3
    Thank you for getting back to me. I ended up implementing the Hbox VBox layout as you suggested and the page works a lot faster and requires far less javascript on my part to make it work. Thank you for your help.
  4. #4
    Excellent. Thank you for the feedback!

Similar Threads

  1. [CLOSED] [1.0] Resize Border layout issues
    By ashton.lamont in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Oct 26, 2010, 7:17 PM
  2. Replies: 2
    Last Post: Jan 01, 2010, 5:51 AM
  3. [CLOSED] [1.0] Portal resize and scrollbar problems
    By danielg in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 02, 2009, 9:12 AM
  4. Replies: 3
    Last Post: Feb 22, 2009, 2:58 PM
  5. Replies: 11
    Last Post: Oct 23, 2008, 8:45 AM

Tags for this Thread

Posting Permissions