[CLOSED] Maximized window doesn't remain maximized

  1. #1

    [CLOSED] Maximized window doesn't remain maximized

    Hi,

    I have an Accordion panel on the left hand side and a main working area with a TabPanel in the centre. The window sits in the working area tab. Here's how it's defined:

        <ext:Window ID="Window1" runat="server" Title="My Window" Icon="UserMagnify" Draggable="false" Layout="FitLayout" Maximized="true" MaxHeight="580"
            BodyStyle="background-color: #fff;"
            Resizable="false" Padding="0" Closable="false" Collapsible="false">
            <Content>
                <uc1:UCTest ID="UCTest1" runat="server" />
            </Content>
        </ext:Window>
    When I collapse the Accordion, the window follows it to the left margin leaving an empty gap the size of the Accordion on the right. I want it maximized occupying the whole working area. Please suggest a way to achieve it or any viable alternative.

    Thanks,

    Vadym
    Last edited by Daniil; Feb 13, 2012 at 9:08 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Is there IFrame in the working area?

    Could you provide a full sample to reproduce the problem?
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,

    Is there IFrame in the working area?

    Could you provide a full sample to reproduce the problem?
    I believe there's. Here's the TabPanel definition in the working area:

                <ext:TabPanel ID="tpMain" runat="server" Region="Center" Margins="0 4 4 0" EnableTabScroll="true"
                    MinTabWidth="85">
                    <Items>
                        <ext:Panel ID="Tab1" runat="server" Title="My Window Tab" TabTip="My Window Tab"
                            Icon="ApplicationSideList" IconCls="icon-application">
                            <AutoLoad Mode="IFrame" Url="~/Accordion/PageWithWindow.aspx" ShowMask="true" />
                        </ext:Panel>
                    </Items>
                    <Plugins>
                        <ext:TabCloseMenu runat="server" />
                        <ext:TabScrollerMenu runat="server" PageSize="5">
                        </ext:TabScrollerMenu>
                    </Plugins>
                </ext:TabPanel>
    I will try to prepare a full code sample if that's not enough. Please advise.

    Thanks,

    Vadym
  4. #4
    I'm still not sure how all is configured on your side, but, I guess, it's not required to use a Window within working area.

    What about to use a Viewport instead of Window?

    I guess you use Window with Maximized="true" to get a container which would be stretched to fill all available space, right? If so, a Viewport would be better to use.
  5. #5
    Quote Originally Posted by Daniil View Post
    I'm still not sure how all is configured on your side, but, I guess, it's not required to use a Window within working area.

    What about to use a Viewport instead of Window?

    I guess you use Window with Maximized="true" to get a container which would be stretched to fill all available space, right? If so, a Viewport would be better to use.
    You're correct, my objective is to get the panels to stretch across the working area. At the same time, I've been struggling to get the AutoScroll to work properly, especially if the same UC is to be used on a popup and inline on the working area. I resorted to using a Window in hope to remedy those issues. I would appreciate it if you shared a code sample having a form panel and a grid located underneath with properly working AutoScroll. The form's controls have to retain their original size, they aren't anchored. The form panel has a fixed size whereas the grid should occupy all the remaining space in the working area.

    Thanks,

    Vadym
  6. #6
    Here you are. Hopefully, I correctly understand your requirement.

    Example
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                Store store = this.GridPanel1.GetStore();
                object[] data = new object[200];
                for (int i = 0; i < 200; i++)
                {
                    data[i] = new object[] { "test" + i };
                }
                
                store.DataSource = data;
                store.DataBind();
            }
        }
    </script>
    
    <!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 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Viewport runat="server" Layout="VBoxLayout">
                <LayoutConfig>
                    <ext:VBoxLayoutConfig Align="Stretch" />
                </LayoutConfig>
                <Items>
                    <ext:FormPanel runat="server" Height="100">
                        <Items>
                            <ext:TextField runat="server" FieldLabel="TextField" />
                            <ext:TextField runat="server" FieldLabel="TextField" />
                        </Items>
                    </ext:FormPanel>
                    <ext:GridPanel ID="GridPanel1" runat="server" Flex="1">
                        <Store>
                            <ext:Store runat="server">
                                <Reader>
                                    <ext:ArrayReader>
                                        <Fields>
                                            <ext:RecordField Name="test" />
                                        </Fields>
                                    </ext:ArrayReader>
                                </Reader>
                            </ext:Store>
                        </Store>
                        <ColumnModel runat="server">
                            <Columns>
                                <ext:Column Header="Test" DataIndex="test" />
                            </Columns>
                        </ColumnModel>
                    </ext:GridPanel>
                </Items>
            </ext:Viewport>
        </form>
    </body>
    </html>
  7. #7
    Thanks Daniil,

    The top panel is not scrolling horizontally when the browser window width becomes less than the form's. I need both panels to scroll in both directions if necessary.

    Thanks,

    Vadym
  8. #8
    Quote Originally Posted by vadym.f View Post
    The top panel is not scrolling horizontally when the browser window width becomes less than the form's. I need both panels to scroll in both directions if necessary.
    Well, when is it required?

    Hope the following example helps.
    http://forums.ext.net/showthread.php...ll=1#post71799
  9. #9
    Quote Originally Posted by Daniil View Post
    Well, when is it required?

    Hope the following example helps.
    http://forums.ext.net/showthread.php...ll=1#post71799
    Hi Daniil,

    When the screen size is less than the dimensions of the FormPanel or GridPanel, I want them to scroll horizontally or vertically as needed. The example provided works well horizontally even though the text boxes shrink instead of staying the same as I need. Vertically, however, the panels don't scroll thus hiding the controls.

    Thanks,

    Vadym
  10. #10
    Well, there is no exactly that you need in the example, it just demonstrates some basics how to get custom scrolling behavior and helps you to start implementing your requirement.

Similar Threads

  1. [CLOSED] Problem: Closing Maximized Window will loose parent window scrollbar
    By tlfdesarrollo in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 19, 2012, 8:51 PM
  2. [CLOSED] Show Desktop window maximized - strange behavior
    By FAS in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Apr 03, 2012, 5:58 PM
  3. Replies: 2
    Last Post: Oct 14, 2010, 10:05 AM
  4. How to show window maximized ?
    By n_s_adhikari@rediffmail.com in forum 1.x Help
    Replies: 4
    Last Post: Jun 03, 2010, 6:27 AM
  5. Bug when showing a window maximized
    By Jurke in forum Bugs
    Replies: 0
    Last Post: Oct 29, 2008, 12:56 PM

Posting Permissions