[CLOSED] How I can get the similar layout in 2.0

  1. #1

    [CLOSED] How I can get the similar layout in 2.0

    Hi,

    I had something like below code for login window before:

        <ext:Viewport ID="vpLogin" IDMode="Explicit" runat="server" Layout="Center">
            <Items>
                <ext:Window ID="windowLogin" runat="server" Layout="Center">
                    <Items>
                        <ext:Hidden IDMode="Explicit" ID="txtPleaseWait" runat="server" Text="HiddenText" />
                     </Items>
               </ext:Window>
            </Items>
        </ext:Viewport>
    After I upgraded to 2.0, I found an issues: the window doesn't show out anymore.

    I have checked change log and found that center layout is not existed anymore. So, how I can get a similar looking layout in 2.0? Please provide me an example. Many thanks.

    RCM
    Last edited by Daniil; Jun 26, 2012 at 9:10 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Two issues:

    1. Remove the <ext:Window> Component from inside the <ext:Viewport>.

    2. The "Center" Layout has been removed in v2. You can use HBoxLayout. I believe there are more notes in the CHANGELOG.txt regarding this change.

    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3
    You don't need Center layout for a window.
    Wndow is centered automatically if X/Y coordinates are not defined
  4. #4
    Quote Originally Posted by geoffrey.mcgill View Post
    Hi,

    Two issues:

    1. Remove the <ext:Window> Component from inside the <ext:Viewport>.

    2. The "Center" Layout has been removed in v2. You can use HBoxLayout. I believe there are more notes in the CHANGELOG.txt regarding this change.

    Hope this helps.
    But I need the window. The window is a modal one which contains logon form.
  5. #5
    Just place the window outside Viewport.
    Window is floatable widget and will be centered automatically
  6. #6
    Quote Originally Posted by Vladimir View Post
    Just place the window outside Viewport.
    Window is floatable widget and will be centered automatically
    Yes. Thank you for the information. I saw the window is centered automatically on first load. But, if I resize IE the window is not adjusting its position to the center of resized IE. What I missed? Thanks again.

    RCM
  7. #7
    I would listen the WindowResize event to center the Window.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE>
    
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <ext:ResourceManager runat="server">
            <Listeners>
                <WindowResize Handler="App.Window1.center();" />
            </Listeners>
        </ext:ResourceManager>
        <ext:Window ID="Window1" runat="server" />
    </body>
    </html>
    Last edited by Daniil; Jun 20, 2012 at 8:26 PM.

Similar Threads

  1. Replies: 4
    Last Post: Jan 12, 2012, 11:47 AM
  2. [CLOSED] DisplayField (or something similar) in version 0.8.2
    By dnguyen in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 25, 2011, 3:05 PM
  3. Replies: 4
    Last Post: Jun 25, 2010, 4:19 PM
  4. Replies: 10
    Last Post: Nov 20, 2008, 3:17 PM
  5. Similar to an updatepanel
    By heysol in forum 1.x Help
    Replies: 0
    Last Post: Oct 27, 2008, 9:10 PM

Posting Permissions