AutoScroll whitespace not disappearing on window resize

  1. #1

    AutoScroll whitespace not disappearing on window resize

    I have a window that contains a BorderLayout with West and Center regions. The West region is made up of another BorderLayout, with North and Center regions. The Center region is made up of a Panel that contains a ContainerLayout inside. This ContainerLayout contains multiple panels that has Collapsable=True, to try and simulate an Accordian type control that each panel can remain visible. The outer panel has AutoScroll=True. When collapsing/expanding the panels within the ContainerLayout, it will AutoScroll correctly, displaying/hiding the scrollbar correctly. However, if the scrollbar is currently visible, and the outer window is resized enough to not need the scrollbars, the scrollbars disappear, but the resulting whitespace remains. Please take a look at the attached images.

    On the first image (autoscroll_good.gif) the window is resized enough to require vertical scrollbar. The second image (autoscroll_bad.gif) the window height was moved down a little to not require vertical scrollbar. You can see the scrollbar correctly disappears, but the whitespace remains. I did set the "MonitorWindowResize=True", but that didn't seem to work.
  2. #2

    RE: AutoScroll whitespace not disappearing on window resize

    Can you post the code used to create the "Search" Window in the screen captures? If we're testing with the exact same code it will help reproduce the scenario and ensure we come up with a proper fix.*

    Geoffrey McGill
    Founder
  3. #3

    RE: AutoScroll whitespace not disappearing on window resize

    Hi dbassett74,

    Try adding the Panels inside an <ext:ContainerLayout> and retest. It's a long shot, big it might help.

    There is a new <ext:HBox> Layout component coming in the next major release (after v0.8) which should solve this problem.

    Geoffrey McGill
    Founder
  4. #4

    RE: AutoScroll whitespace not disappearing on window resize

    I will try this today sometime and let you know. If it doesn't work, I will provide you with sample code to duplicate the problem.
  5. #5

    RE: AutoScroll whitespace not disappearing on window resize

    In Markup, Visual Studio 2005 complains that "Panel" is not a known element when dropped inside the ContainerLayout, even though it does compile. But, it renders the intelisense on the Panel object unusable. Is this a bug?
  6. #6

    RE: AutoScroll whitespace not disappearing on window resize

    I'm having a bit of a problem with this now. Here's what I'm trying to do so maybe you can give me a better suggestion. In the West panel, I want to have the following items:

    1) At the top, I want a fixed panel with height of 300. We'll call this "PanelHeader".

    2) Directly underneath the top panel, I want another panel that fills up the remaining height of the West panel, so this means if resized, it stretches or shrinks. We'll call this "PanelOptions".

    3) Within "PanelOptions", I want several other panels that are Collapsable. This means that "PanelOptions" must be AutoScroll.

    Any help on this would be appreciated.
  7. #7

    RE: AutoScroll whitespace not disappearing on window resize

    geoffrey.mcgill (4/22/2009)Hi dbassett74,

    Try adding the Panels inside an <ext:ContainerLayout> and retest. It's a long shot, big it might help.

    There is a new <ext:HBox> Layout component coming in the next major release (after v0.8) which should solve this problem.
    Here is the code to reproduce the problem. Just resize the window height and you will see that the scollbar disappears, but the whitespace remains. What is the HBox?:

            <ext:ScriptManager ID="ScriptManager1" runat="server">
            </ext:ScriptManager>
            <ext:Window ID="SearchView" runat="server" Collapsible="false" Icon="Magnifier" Title="Search" Width="600" Height="400">
                <Body>
                    <ext:BorderLayout ID="SearchMainBorderLayout" runat="server">
                        <West Split="true">
                            <ext:Panel ID="SearchViewWestPanel" runat="server" Width="175" AutoScroll="true" >
                                <Body>
                                    <ext:BorderLayout ID="SearchWestBorderLayout" runat="server">
                                        <North>
                                            <ext:Panel ID="Panel2" runat="server" Height="150" Collapsible="false">
                                                <Body>
                                                    Search Header Panel
                                                </Body>
                                            </ext:Panel>
                                        </North>
                                        <Center>
                                            <ext:Panel ID="Panel1" runat="server" AutoScroll="true">
                                                <Body>
                                                    <ext:Panel ID="Panel3" runat="server" Title="File Name" Height="100" Collapsible="true">
                                                        <Body>
                                                            File name panel
                                                        </Body>
                                                    </ext:Panel>
                                                    <ext:Panel ID="Panel4" runat="server" Title="File Text" Height="200" Collapsible="true">
                                                        <Body>
                                                            File text panel
                                                        </Body>
                                                    </ext:Panel>
                                                </Body>
                                            </ext:Panel>
                                        </Center>
                                    </ext:BorderLayout>
                                </Body>
                            </ext:Panel>
                        </West>
                        <Center>
                            <ext:Panel ID="SearchViewCenterPanel" runat="server">
                                <Body>
                                    Center Panel
                                </Body>
                            </ext:Panel>
                        </Center>
                    </ext:BorderLayout>
                </Body>
            </ext:Window>
  8. #8

    RE: AutoScroll whitespace not disappearing on window resize

    I reproduced the issue, although I was unable to determine exactly what is causing the problem.

    I did discover an easy work-around as demonstrated in the following sample.

    Example

    <ext:Panel ID="Panel1" runat="server" AutoScroll="true">
        <Body>
            <ext:Panel ID="Panel3" runat="server" Title="File Name" Height="100" Collapsible="true">
                <Body>
                    File name panel
                </Body>
            </ext:Panel>
            <ext:Panel ID="Panel4" runat="server" Title="File Text" Height="200" Collapsible="true">
                <Body>
                    File text panel
                </Body>
            </ext:Panel>
        </Body>
        <Listeners>
            <Resize Handler="el.getSize();" />
        </Listeners>
    </ext:Panel>
    For some reason the call to .getSize() forces a recalc on the inner panels, which resets their size to the new container dimensions.

    As well, it would be a good idea to add Panel3 &amp; Panel4 inside an <ext:ContainerLayout>.

    Hope this helps.

    Geoffrey McGill
    Founder
  9. #9

    RE: AutoScroll whitespace not disappearing on window resize

    In Markup, Visual Studio 2005 complains that "Panel" is not a known element when dropped inside the ContainerLayout, even though it does compile. But, it renders the intelisense on the Panel object unusable. Is this a bug?
    Best we can tell it is a bug and microsoft has fixed with VS 2008, although I'm not sure if they've made a patch is available for VS 2008.

    Geoffrey McGill
    Founder

Similar Threads

  1. Replies: 1
    Last Post: Sep 20, 2011, 9:42 AM
  2. Window Height, AutoHeight, Max-MinHeight Autoscroll
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 06, 2010, 1:56 PM
  3. ToolTip whitespace
    By dbassett74 in forum 1.x Help
    Replies: 3
    Last Post: Jun 02, 2009, 1:56 AM
  4. [CLOSED] Center window on window resize
    By CSG in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: May 29, 2009, 5:05 AM
  5. Replies: 0
    Last Post: Apr 29, 2009, 2:32 PM

Posting Permissions